https://github.com/sclevine/jasmine-runner-node
Run Jasmine 2.0 specs using PhantomJS
https://github.com/sclevine/jasmine-runner-node
Last synced: 2 months ago
JSON representation
Run Jasmine 2.0 specs using PhantomJS
- Host: GitHub
- URL: https://github.com/sclevine/jasmine-runner-node
- Owner: sclevine
- License: mit
- Created: 2014-04-04T09:37:51.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-03T20:26:40.000Z (almost 10 years ago)
- Last Synced: 2025-02-02T06:23:41.760Z (3 months ago)
- Language: JavaScript
- Size: 193 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jasmine-runner-node
====================
- Run Jasmine 2 specs with (or without) PhantomJS
- Compatible with any task runner
- Uses official jasmine-core node module
- Doesn't generate temporary spec runner files
- Doesn't require an external phantom installation
- Detects added/removed spec/js/css files
- Perfect for use with [gulp.js](http://gulpjs.com/)Installation
============
In your project root, run: `npm install jasmine-runner-node --save-dev`Usage
=====
``` javascript
var jasmine = require('jasmine-runner-node');// start server
jasmine.start({
root: , // project root (default: client module root)
port: , // port number to serve jasmine on (default: 8888)
files: { // (in order of spec runner inclusion)
css: ,
specHelper: ,
js: ,
spec: ,
other:
}
});// stop server
jasmine.stop()// start server, run phantom, stop server
// (also takes all options above)
jasmine.run({
showColors: , // colorize phantomjs output (default: true)
testOutput: , // stream for test report output (default: stdout)
phantomOutput: , // stream for phantom output (default: stderr)
});```
Testing
=======
Run `npm test` :)Caveats
=======
The jasmine-core node module must be pulled in as a dependency of
jasmine-runner-node and not of any parent module, as it expects jasmine-core
to be present in `jasmine-runner-node/node_modules`. This means that
jasmine-core should not be a direct dependency of any node package that
depends on jasmine-runner-node.(more docs coming soon)