Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix example to work with new constructor callback

Update README with new example and document TEST_TRANSPORT.
  • Loading branch information...
commit abbd6bf961f90f437d5a41583b5f11dadf7c5cb2 1 parent 0311092
@lawnsea lawnsea authored
Showing with 12 additions and 9 deletions.
  1. +9 −5 README.md
  2. +3 −4 examples/hello.js
View
14 README.md
@@ -19,18 +19,21 @@ $ npm install spooky
## Usage
``` javascript
-var Spooky = require('spooky');
+var Spooky = require('../lib/spooky');
var spooky = new Spooky({
+ child: {
+ script: './lib/bootstrap.js',
+ spooky_lib: './node_modules'
+ },
casper: {
logLevel: 'debug',
verbose: true
}
- }, function (err, error, response) {
- var e;
- if (err || error) {
+ }, function (err) {
+ if (err) {
e = new Error('Failed to initialize SpookyJS');
- e.details = err || error;
+ e.details = err;
throw e;
}
@@ -96,6 +99,7 @@ The following make parameters are supported (defaults are in parentheses):
* `TEST_SLOW` threshold in ms to say a test is slow (2000)
* `TEST_ARGS` Additional [arguments](http://visionmedia.github.com/mocha/#usage) to pass through to Mocha
* `TEST_DEBUG` Print debug logging to the console (false)
+* `TEST_TRANSPORT` the Spooky transport to use when running the tests (stdio)
## License
View
7 examples/hello.js
@@ -2,7 +2,6 @@ var Spooky = require('../lib/spooky');
var spooky = new Spooky({
child: {
- port: 8081,
script: './lib/bootstrap.js',
spooky_lib: './node_modules'
},
@@ -10,10 +9,10 @@ var spooky = new Spooky({
logLevel: 'debug',
verbose: true
}
- }, function (err, error) {
- if (err || error) {
+ }, function (err) {
+ if (err) {
e = new Error('Failed to initialize SpookyJS');
- e.details = err || error;
+ e.details = err;
throw e;
}

0 comments on commit abbd6bf

Please sign in to comment.
Something went wrong with that request. Please try again.