GitHub user robertkowalski opened a pull request:
https://github.com/apache/couchdb-fauxton/pull/157
Enable passing a single test to nightwatch
You can now pass single testfiles to nightwatch which makes
development of tests easier and faster.
Example:
`grunt nightwatch --file="createsDatabase"` launches the
createsDatabase.js testfile in app/databases/tests/nightwatch
The code overwrites initial command as we don't have access to
the passed options to grunt in the `initConfig` setter. Another
solution could be using `process.argv` - however I am not a
Grunt expert and would like to get some feedback which approach
is the better way to write Grunt
For me using `process.argv` would be the way to go (I realized I
could probably access it from here when I finished the other
code) but maybe it is a grunt-antipattern for reasons I am not
aware of
Happy testing!
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/robertkowalski/couchdb-fauxton
grunt-single-nightwatch-test
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-fauxton/pull/157.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #157
----
commit 6f539dad64361efa28d082926b96fc89da9215bd
Author: Robert Kowalski <[email protected]>
Date: 2014-11-18T16:55:47Z
Enable passing a single test to nightwatch
You can now pass single testfiles to nightwatch which makes
development of tests easier and faster.
Example:
`grunt nightwatch --file="createsDatabase"` launches the
createsDatabase.js testfile in app/databases/tests/nightwatch
The code overwrites initial command as we don't have access to
the passed options to grunt in the `initConfig` setter. Another
solution could be using `process.argv` - however I am not a
Grunt expert and would like to get some feedback which approach
is the better way to write Grunt.
Happy testing!
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---