Created
November 20, 2011 21:54
-
-
Save cpsubrian/1380993 to your computer and use it in GitHub Desktop.
Getting spawn to work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
The following is in a Cakefile and when I run it it causes errors. | |
However, if I just run: `vows test/*.coffee --spec` on the command line, all is fine. | |
### | |
{spawn} = require 'child_process' | |
task 'test', 'Run Vows tests', -> | |
args = ['test/*.coffee', '--spec'] | |
options = {cwd: __dirname} | |
spec = spawn 'vows', args, options | |
spec.stdout.on 'data', (data) -> print data.toString() | |
spec.stderr.on 'data', (data) -> print data.toString() | |
spec.on 'exit', (status) -> callback?() if status is 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cake test | |
node.js:134 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: Cannot find module '/home/cpsubrian/projects/node/coffee-dox/test/*' | |
at Function._resolveFilename (module.js:317:11) | |
at Function._load (module.js:262:25) | |
at require (module.js:346:19) | |
at /home/cpsubrian/.nvm/v0.4.11/lib/node_modules/vows/bin/vows:466:19 | |
at Array.reduce (native) | |
at importSuites (/home/cpsubrian/.nvm/v0.4.11/lib/node_modules/vows/bin/vows:461:18) | |
at Object.<anonymous> (/home/cpsubrian/.nvm/v0.4.11/lib/node_modules/vows/bin/vows:240:15) | |
at Module._compile (module.js:402:26) | |
at Object..js (module.js:408:10) | |
at Module.load (module.js:334:31) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vows test/*.coffee | |
····················································································· ······ | |
✓ OK » 91 honored (0.142s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment