Skip to content

Instantly share code, notes, and snippets.

@maowug
Created August 26, 2015 15:27
Show Gist options
  • Save maowug/91708914e0629019092a to your computer and use it in GitHub Desktop.
Save maowug/91708914e0629019092a to your computer and use it in GitHub Desktop.
# # index.js
# var hello = require('./hello.coffee')
# console.log(hello());
assert = require 'power-assert'
exec = require('child_process').exec
cmd = 'node index.js'
describe 'testcli', ->
it 'index.js should return hello world!', ->
exec cmd, (err, stdout, stderr)->
assert stdout == "hello!\n"
done()
wallaby.js started
core v1.0.91
Finished executing 2 affected test(s)
Runtime error: TypeError: Cannot read property '5' of undefined
at /Users/actor2019/Library/Caches/WebStorm10/wallaby/projects/56802b04120d620f/instrumented/test/clitest.js:18:21
at ChildProcess.exithandler (child_process.js:723:5)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:169:7)
at maybeClose (child_process.js:984:16)
at Socket.<anonymous> (child_process.js:1153:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:166:7)
module.exports = function () {
return {
"files": [
"src/*.coffee",
"*.js",
"*.coffee"
],
"tests": [
"test/*.coffee"
],
env: {
// use 'node' type to use node.js or io.js
type: 'node',
// if runner property is not set, then wallaby.js embedded node/io.js version is used
// you can specifically set the node version by specifying 'node' (or any other command)
// that resolves your default node version or just specify the path
// your node installation, like
// runner: 'node'
// or
// runner: 'path to the desired node version'
params: {
// node flags
runner: '--harmony --harmony_arrow_functions',
// env vars
env: 'PARAM1=true;PARAM2=false'
}
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment