Example DaSpec JS setup running inside Node for testing javascript projects.
This project demonstrates how to:
- Use Node to run DaSpec tests from the console
- Load custom formatters (using the JUnit XML Formatter)
- Load custom matcher libraries (using the Quantity Matchers)
- Load system under test files using Node Modules (quantity-steps.js uses speeds.js)
- Load system under test files using DaSpec configuration (inventory-steps.js uses inventory-service.js)
Check out the git repository, then do
npm install
to pull the dependencies. You should be able to run
npm test
and DaSpec will execute the spec files from the specs folder, saving them into daspec-output
.
For configuration details, see the scripts part of package.json and the custom-daspec.json config file.