This is useful in continuous testing environments, such as under gulp-jasmine
Currently, running gulp-node, which depends upon minijasminenode, with the following config results in subsequent spec executions appending results to the previous output, so a single test will result in an exponential increase in results and counts. This also suggests leaky tests could leave artifacts around to affect subsequent executions. This change allows one to reset jasmine to its initial state before execution of specs. (Sorry about the odd meta-test - couldn't come up with a simple, more elegant way without significantly changing or duplicating cli.js)
sample gulp config:
var gulp = require('gulp'),
jasmine = require('gulp-jasmine')
gulp.task('jasmine', function () {
gulp.src(testFiles)
.pipe(jasmine());
});
gulp.task('default', function() {
gulp.watch(testFiles, ['jasmine'])
});
This is useful in continuous testing environments, such as under gulp-jasmine
Currently, running gulp-node, which depends upon minijasminenode, with the following config results in subsequent spec executions appending results to the previous output, so a single test will result in an exponential increase in results and counts. This also suggests leaky tests could leave artifacts around to affect subsequent executions. This change allows one to reset jasmine to its initial state before execution of specs. (Sorry about the odd meta-test - couldn't come up with a simple, more elegant way without significantly changing or duplicating cli.js)
sample gulp config:
var gulp = require('gulp'), jasmine = require('gulp-jasmine') gulp.task('jasmine', function () { gulp.src(testFiles) .pipe(jasmine()); }); gulp.task('default', function() { gulp.watch(testFiles, ['jasmine']) });
Signed-off-by: Jason Van Pelt jasonpvp@gmail.com