Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh fork: jasmine tests fail #294

Closed
LarryKlugerDS opened this issue Feb 9, 2016 · 3 comments
Closed

Fresh fork: jasmine tests fail #294

LarryKlugerDS opened this issue Feb 9, 2016 · 3 comments

Comments

@LarryKlugerDS
Copy link
Contributor

Hi,
Thank you for the great sw. I did a fresh fork, npm install, and gulp jasmine. There were a number of warnings and errors. See logs below.
Regards,
Larry

NPM Install

$ npm install
npm WARN peerDependencies The peer dependency jasmine-core@* included from karma-jasmine will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated lodash@2.4.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0
npm WARN deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm

npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0

--- Skipping successful installs ---

Jasmine test

gulp jasmine
[10:03:40] Using gulpfile ~/www/mermaid/gulpfile.js
[10:03:40] Starting 'jison'...
[10:03:40] Starting 'lint'...
[10:03:40] [Jison file:] [1] [/Users/larry.kluger/www/mermaid/src/diagrams/example/parser/example.jison]
[10:03:40] [Jison file:] [2] [/Users/larry.kluger/www/mermaid/src/diagrams/classDiagram/parser/classDiagram.jison]
[10:03:40] [Jison file:] [3] [/Users/larry.kluger/www/mermaid/src/diagrams/flowchart/parser/dot.jison]

src/logger.js
line 13 col 1 'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

⚠ 1 warning

[10:03:40] [Jison file:] [4] [/Users/larry.kluger/www/mermaid/src/diagrams/flowchart/parser/flow.jison]
[10:03:41] [Jison file:] [5] [/Users/larry.kluger/www/mermaid/src/diagrams/gantt/parser/gantt.jison]
[10:03:41] [Jison file:] [6] [/Users/larry.kluger/www/mermaid/src/diagrams/sequenceDiagram/parser/sequenceDiagram.jison]
[10:03:41] [Jison file:] Found [6] files.
[10:03:41] Finished 'jison' after 887 ms

src/diagrams/classDiagram/classRenderer.js
line 35 col 2 Missing semicolon.
line 221 col 2 Missing semicolon.
line 379 col 9 'i' is already defined.

⚠ 3 warnings

src/diagrams/sequenceDiagram/sequenceDb.js
line 15 col 50 Use '===' to compare with 'null'.
line 18 col 22 Use '===' to compare with 'null'.

⚠ 2 warnings

[10:03:41] Finished 'lint' after 1.57 s
[10:03:41] Starting 'jasmine'...
[10:03:42] 'jasmine' errored after 199 ms
[10:03:42] ReferenceError in plugin 'gulp-jasmine'
Message:
SVGElement is not defined
Stack:
ReferenceError: SVGElement is not defined
at Object. (/Users/larry.kluger/www/mermaid/src/mermaidAPI.js:36:1)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/Users/larry.kluger/www/mermaid/src/mermaid.js:9:18)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)

@knsv
Copy link
Collaborator

knsv commented Feb 9, 2016

The jasmine tests now uses karma. It grew troublesome to mock the DOM for the tests.

Instead of the gulp task, try:
npm run karma

Good luck

@LarryKlugerDS
Copy link
Contributor Author

Hi,

Yes, the npm run karma tests worked great, thank you!

Regards,
Larry

@tylerlong
Copy link
Collaborator

Latest command for testing is yarn test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants