Repository navigation
Closed
Labels
Description
tns create TestApp && cd TestApp
tns test init --framework mocha
tns test android
Result:
module.js:471
throw err;
^
Error: Cannot find module 'mocha'
at Function.Module._resolveFilename (module.js:469:15)
at Function.resolve (internal/module.js:27:19)
at initMocha (/Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma-mocha/lib/index.js:10:40)
at Array.invoke (/Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Injector.get (/Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma/node_modules/di/lib/injector.js:48:43)
at /Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma/lib/server.js:143:20
at Array.forEach (native)
at Server._start (/Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma/lib/server.js:142:21)
at Injector.invoke (/Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Server.start (/Users/topuzov/Git/nativescript-cli-tests/TNS_App/node_modules/karma/lib/server.js:103:18)
at process.<anonymous> (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/services/karma-execution.js:8:15)
at emitTwo (events.js:106:13)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:744:12)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Error: Test run failed.
at FiberFuture.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:566:15)
at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/common/errors.js:128:33
at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:249:26)
at FiberFuture.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:565:10)
at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/common/services/commands-service.js:84:106
at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:249:26)
at FiberFuture.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:565:10)
at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/common/yok.js:208:124
at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:249:26)
at FiberFuture.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:565:10)
at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/common/services/commands-service.js:51:55
at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:249:26)
at FiberFuture.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:565:10)
at /Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/common/errors.js:128:33
at Function.settle (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:249:26)
at FiberFuture.wait (/Users/topuzov/Git/nativescript-cli-tests/node_modules/fibers/future.js:565:10)
- - - - -
at ChildProcess.<anonymous> (/Users/topuzov/Git/nativescript-cli-tests/node_modules/nativescript/lib/services/test-execution-service.js:111:33)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Workaround:
tns create TestApp && cd TestApp
tns test init --framework mocha
npm install --save-dev mocha
tns test android
Reacted by Travis Jacobs
Activity
dtopuzov commentedon Nov 30, 2016
Same for jasmine, you should manually install
jasmine-corevchimev commentedon Jan 23, 2017
+ you'd need to install chai:
npm install --save-dev chaidtopuzov commentedon Apr 25, 2017
Duplicate of #2283