Fix tests on Windows (hopefully)

This commit is contained in:
Daniel Imms
2019-05-26 12:43:33 -07:00
parent 9f77de42eb
commit eb6e3ab7f7
2 changed files with 19 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
const cp = require('child_process');
const path = require('path');
// Add `out` to the NODE_PATH so absolute paths can be resolved.
const env = { ...process.env };
env.NODE_PATH = path.resolve(__dirname, '../out');
cp.spawnSync('yarn', ['mocha'], {
cwd: path.join(__dirname, '..'),
stdio: 'inherit',
env
});
+2 -2
View File
@@ -58,11 +58,11 @@
"start-debug": "node --inspect-brk demo/start",
"start-zmodem": "node demo/zmodem/app",
"lint": "tslint 'src/**/*.ts' './demo/**/*.ts'",
"test": "npm run mocha",
"test": "node ./bin/test.js",
"posttest": "npm run lint",
"test-coverage": "nyc -x gulpfile.js -x '**/*test*' npm run mocha",
"test-api": "mocha \"**/*.api.js\"",
"mocha": "NODE_PATH=$(pwd)/out gulp test",
"mocha": "gulp test",
"prebuild": "tsc -b ./src/tsconfig.all.json",
"build": "gulp build",
"prepare": "npm run prebuild",