feature(build): add nodejs-based unit test for dart transpiler.

This adds a unit test to the transpiler. Existing tests are themselves transpiled to ES5, which makes it impossible to do some kinds of assertions. For example, this will be useful to repro https://github.com/angular/angular/issues/509.
In this change, the actual issue isn't fixed. It only adds the reproduction.
It uses the jasmine test runner, since it's already used by the docs test. That uses version 1 of Jasmine, which isn't ideal, but I want to be consistent for now.
I discussed with Tobias the possibility of switching to Mocha for these nodejs-based tests, and we might do that sometime later.
This commit is contained in:
Alex Eagle
2015-02-04 14:59:12 -08:00
parent 3395624cb3
commit e20d9dd073
3 changed files with 39 additions and 7 deletions

View File

@ -434,8 +434,13 @@ gulp.task('test.js/ci', function (done) {
gulp.task('test.dart/ci', function (done) {
karma.start({configFile: __dirname + '/karma-dart.conf.js', singleRun: true, reporters: ['dots'], browsers: getBrowsersFromCLI()}, done);
});
gulp.task('test.transpiler.unittest', function (done) {
return gulp.src('tools/transpiler/unittest/**/*.js')
.pipe(jasmine())
});
gulp.task('ci', function(done) {
runSequence(
'test.transpiler.unittest',
'test.js/ci',
'test.dart/ci'
);