An example of using Chimp to run BDD tests really easily in Node, using the sample tests from the documentation.
There is a sample Cucumber test, and a sample Mocha test.
Just a recent version of NodeJS (v5.3.0 or higher?) and Chrome installed.
- Clone the repository:
git clone [email protected]:decates/chimp-example.git
- Install dependencies:
npm install
Run the Cucumber test once only: npm test
or, run the mocha test: npm run-script mocha
Chimp comes into its own when watching test files for changes, keeping the browser open, and re-running tests quickly to provide rapid feedback.
To watch the Cucumber test (features/search.feature): npm run-script watch
or to watch the Mocha test (features/google.js): npm run-script mocha-watch