I use Intern 4.0 (Yes! i know! it's an alpha version. But I want rewrite my code and unit tests in es6).
I installed the npm package "intern 4.0.0-alpha.4", I rewrited code, unit tests, and suite in es6.
But i'm unable to run tests. I want run tests from the npm scripts : I edited my package.json
file to get:
"scripts": {
"test": "node_modules/.bin/intern"
}
I 'm also tried with :
"scripts": {
"test": "node_modules/.bin/intern config=intern.json"
}
or with the inter-cli :
"scripts": {
"test": "intern run --config intern.json"
}
Then i run the command npm run test
Here the log file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test' ]
2 info using npm@4.4.4
3 info using node@v6.10.3
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle myproject@0.0.1~pretest: myproject@0.0.1
6 silly lifecycle myproject@0.0.1~pretest: no script for pretest, continuing
7 info lifecycle myproject@0.0.1~test: myproject@0.0.1
8 verbose lifecycle myproject@0.0.1~test: unsafe-perm in lifecycle true
9 verbose lifecycle myproject@0.0.1~test: PATH: ...
10 verbose lifecycle myproject@0.0.1~test: CWD: D:\Temp\myproject
11 silly lifecycle myproject@0.0.1~test: Args: [ '/d /s /c', 'intern config=intern.json' ]
12 silly lifecycle myproject@0.0.1~test: Returned: code: 1 signal: null
13 info lifecycle myproject@0.0.1~test: Failed to exec test script
14 verbose stack Error: myproject@0.0.1 test: `intern config=intern.json`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid myproject@0.0.1
16 verbose cwd D:\Temp\myproject
17 verbose Windows_NT 10.0.14393
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
19 verbose node v6.10.3
20 verbose npm v4.4.4
21 error code ELIFECYCLE
22 error errno 1
23 error myproject@0.0.1 test: `intern config=intern.json`
23 error Exit status 1
24 error Failed at the myproject@0.0.1 test script 'intern config=intern.json'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the myproject package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error intern config=intern.json
24 error You can get information on how to open an issue for this project with:
24 error npm bugs myproject
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls myproject
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
Have you an idea?
via Troopers
No comments:
Post a Comment