Amaze test-driven development
This is a set of tools that will allow for test-driven development using the following technologies:
- Mocha
- Chai
- selenium-webdriver
- Chrome, Firefox, IE, or PhantomJS
TLDR; Install
Install the suite globally to have easy access to amaze
from the command line:
npm install -g amaze-tdd
Then install the testing suite into each project root directory with:
npm install amaze-tdd
Running tests
Ensure the testing suite is required in the test
var Amaze = require('amaze-tdd)
Develop mode
You have the choice between Chrome (preferred) and Firefox for development. In either case you need to make sure the Amaze plugin is installed. As of right now, only Chrome self-installs.
amaze chrome
, or
amaze firefox
(no plugin at this time)
Production mode
For production, after JavaScript has been compiled and is placed on the remote server, you may use PhantomJS to headlessly test the interfaces. No browser plugin is required.
amaze phantomjs
Test files
Our process will run Mocha on any files in the specified path with the format *-spec.js
. This means that the following examples will work:
test-spec.js
overlay-name-spec.js
camelCase-spec.js
ALLCAPS-spec.js
some-folder/test-spec.js
some-folder/nested-folder/test-spec.js
Basically any file that ends with -spec.js
will be covered in testing.
Changlog
0.0.13
0.0.12
- Directory structure updates; needed an index.js for easier module loading
0.0.11
- Removed selenium/mocha wrapper to reduce dependencies
- Moved to a promise-based test setup
- Switched from BDD to TDD for clarity
- Preferring local install to global; was previously global
- Added changelog :-)
0.0.1 - 0.0.10
- Regreting not starting a changelog sooner
- Basically gets stuff setup and working through bugs