Running just a single test in grunt-casper

Grunt Logo

If you'd like to run a single test with grunt-casper you can do so by making use of grunt.option in your grunt-casper configuration.

One way to do this is to use it in the src property of a multi-task allowing it to fall-back to the wildcard definition that picks up all test files. Here's an example:

Like this running grunt casper --test path/to/tests/js will run the single test file. And running grunt casper will run casper on all your test files.

comments powered by Disqus