Last active
December 21, 2018 05:49
-
-
Save BradEstey/8568564 to your computer and use it in GitHub Desktop.
Use Gulp to automatically run PHPUnit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
sys = require('sys'), | |
exec = require('child_process').exec; | |
gulp.task('phpunit', function() { | |
exec('phpunit', function(error, stdout) { | |
sys.puts(stdout); | |
}); | |
}); | |
gulp.task('default', function() { | |
gulp.watch('**/*.php', { debounceDelay: 2000 }, ['phpunit']); | |
}); |
Gulp..means "zipper" in Dutch. FYI! Keep the party alive!
To run only on saved file: http://laravel-tricks.com/tricks/use-gulp-gulpjscom-to-run-phpunit-tests-on-saved-file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I love this! The only thing it's missing is the ability to run the test on the current edited file only. Any thoughts on this?