https://github.com/kessler/tdd-js-template
a template for a javascript test driven development project. uses jasmine and phantomJS
https://github.com/kessler/tdd-js-template
Last synced: about 2 months ago
JSON representation
a template for a javascript test driven development project. uses jasmine and phantomJS
- Host: GitHub
- URL: https://github.com/kessler/tdd-js-template
- Owner: kessler
- Created: 2012-10-27T01:56:50.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-03T05:29:20.000Z (over 12 years ago)
- Last Synced: 2025-03-08T08:12:41.040Z (about 2 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
tdd-js-template
=================A template for a javascript test driven development project. Uses requireJS, jasmine and phantomJS. This project is built to automatically detect all the specs in a directory and run them, see the command below
* to run the tests you'll need to install [phantomJS](http://phantomjs.org/download.html) on your machine
* add the phantomjs.exe location to your path (or replace to a fully qualified path in the next instruction code)
* run `phantomjs lib/run_jasmine_test.coffee specs`Given the following class file `src/X.js`:
define(function() {
function X() {
}return X;
});The spec file `specs/X_spec.js` will look like this:
define(['X'], function(X) {
describe('X', function() {
it('is an X', function() {
expect(true).toBe(true);
});
});
});**the _spec suffix is mandatory for the script to automatically identify the spec files**
**at the moment the test command can only be run from the project root**