Browse Source

Trying to get the tests to run cross-platform with the usual "npm test"

fix-216-tests
Dan Rzeppa 10 years ago
parent
commit
4f77faaec5
  1. 2
      package.json
  2. 15
      runtests.js
  3. 1
      test/mocha.opts

2
package.json

@ -10,7 +10,7 @@
},
"main": "lib/",
"scripts": {
"test": "NODE_ENV=test ./node_modules/.bin/mocha"
"test": "node ./runtests"
},
"engines": {
"node": "*"

15
runtests.js

@ -0,0 +1,15 @@
var childProcess = require("child_process")
var path = require("path")
var env = process.env
env.NODE_ENV = "test"
var options={
env:env,
stdio:"inherit"
}
var command = path.join(".","node_modules",".bin","mocha")
try {
childProcess.execSync(command,options)
}catch(ex){}

1
test/mocha.opts

@ -1 +1,2 @@
--reporter dot
--ui tdd

Loading…
Cancel
Save