u.go
2015-08-26T15:27:29Z

cli-test.coffee

| # # 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()

log

| 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)

wallaby.js

| 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'
| }
| }
| };
| };