Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

How to actually run the tests #32

Open
@talamaska

Description

@talamaska

I have forked and cloned the repository on Windows machine. I tried to run the tests, but I'm failing on serve.spec.

Failures:

  1) Serve #loadSettings should parse out options from arg hash
   Message:
     Expected 'www\index.html' to be 'www/index.html'.
   Stacktrace:
     Error: Expected 'www\index.html' to be 'www/index.html'.
    at compareOptions (C:\server\www\ionic-app-lib\spec\serve.spec.js:42:30)
    at null.<anonymous> (C:\server\www\ionic-app-lib\spec\serve.spec.js:95:9)

  2) State should get the package json by app directory
   Message:
     Expected spy readInPackageJson to have been called with [ '/test/dev/ionic/package.json' ] but actual calls were [ '\test\dev\ionic\package.json' ]
   Stacktrace:
     Error: Expected spy readInPackageJson to have been called with [ '/test/dev/ionic/package.json' ] but actual calls were [ '\test\dev\ionic\package.json' ]
    at null.<anonymous> (C:\server\www\ionic-app-lib\spec\state.spec.js:24:37)

Finished in 2.009 seconds
167 tests, 296 assertions, 2 failures, 0 skipped



npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "jasmine"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! ionic-app-lib@0.4.0 jasmine: `jasmine-node --captureExceptions  ./spec`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-app-lib@0.4.0 jasmine script 'jasmine-node --captureExceptions  ./spec'.
npm ERR! This is most likely a problem with the ionic-app-lib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     jasmine-node --captureExceptions  ./spec
npm ERR! You can get their info via:
npm ERR!     npm owner ls ionic-app-lib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\server\www\ionic-app-lib\npm-debug.log

and the npm-log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'jasmine' ]
2 info using npm@2.10.1
3 info using node@v0.12.4
4 verbose run-script [ 'prejasmine', 'jasmine', 'postjasmine' ]
5 info prejasmine ionic-app-lib@0.4.0
6 info jasmine ionic-app-lib@0.4.0
7 verbose unsafe-perm in lifecycle true
8 info ionic-app-lib@0.4.0 Failed to exec jasmine script
9 verbose stack Error: ionic-app-lib@0.4.0 jasmine: `jasmine-node --captureExceptions  ./spec`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid ionic-app-lib@0.4.0
11 verbose cwd C:\server\www\ionic-app-lib
12 error Windows_NT 6.3.9600
13 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "jasmine"
14 error node v0.12.4
15 error npm  v2.10.1
16 error code ELIFECYCLE
17 error ionic-app-lib@0.4.0 jasmine: `jasmine-node --captureExceptions  ./spec`
17 error Exit status 1
18 error Failed at the ionic-app-lib@0.4.0 jasmine script 'jasmine-node --captureExceptions  ./spec'.
18 error This is most likely a problem with the ionic-app-lib package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     jasmine-node --captureExceptions  ./spec
18 error You can get their info via:
18 error     npm owner ls ionic-app-lib
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

So my question is, how we are supposed to run the tests? Do we need to be inside some ionic project or those tests should be able to run alone independently? Is there something else I can do to be able to run tests on Windows?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions