Skip to content

Commit 4f77faa

Browse files
committed
Trying to get the tests to run cross-platform with the usual "npm test"
1 parent c4c7b50 commit 4f77faa

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"main": "lib/",
1212
"scripts": {
13-
"test": "NODE_ENV=test ./node_modules/.bin/mocha"
13+
"test": "node ./runtests"
1414
},
1515
"engines": {
1616
"node": "*"

runtests.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var childProcess = require("child_process")
2+
var path = require("path")
3+
4+
var env = process.env
5+
env.NODE_ENV = "test"
6+
7+
var options={
8+
env:env,
9+
stdio:"inherit"
10+
}
11+
12+
var command = path.join(".","node_modules",".bin","mocha")
13+
try {
14+
childProcess.execSync(command,options)
15+
}catch(ex){}

test/mocha.opts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
--reporter dot
12
--ui tdd

0 commit comments

Comments
 (0)