build(broccoli): add testing infrastructure for our build plugins
components: - gulp test.unit.broccoli task - mock-fs for mocking our FS in unit tests - jasmine d.ts file for type checking jasmine lib is provided by minijasmine2 so we don't need to include it explicitly
This commit is contained in:
26
gulpfile.js
26
gulpfile.js
@ -501,6 +501,32 @@ gulp.task('test.unit.cjs', ['build.broccoli.tools'], function (done) {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
gulp.task('test.unit.broccoli', function(done) {
|
||||
|
||||
function buildAndTest() {
|
||||
runSequence('build.broccoli.tools', function() {
|
||||
var doneDeferred = Q.defer();
|
||||
var jasmineProcess = fork('./tools/traceur-jasmine', ['dist/broccoli/**/*.spec.js'], {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
jasmineProcess.on('close', function (code) {
|
||||
doneDeferred.resolve();
|
||||
});
|
||||
|
||||
return doneDeferred.promise;
|
||||
});
|
||||
}
|
||||
|
||||
buildAndTest();
|
||||
|
||||
gulp.watch('tools/broccoli/**', function(event) {
|
||||
buildAndTest();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// ------------------
|
||||
// server tests
|
||||
// These tests run on the VM on the command-line and are
|
||||
|
Reference in New Issue
Block a user