I have basic Gulp tasks, and the basic Jasmine test runner set up. How do I use Gulp to run my Jasmine tests on a file save and show me the output? Where in the pipeline should Jasmine go?
I'm new to both these libraries and to JS build and unit testing systems generally, so unsure of the issues and best practice and I haven't found anything online that is basic enough for me :-)
You can make use of gulp.watch
, this watches files and does something when a file changes.
You could make a task like this, or simply use the gulp.watch
in another task.
gulp.task('watch', function () {
gulp.watch('tests/**/*', ['jasmine']);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With