question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interesting issue with v0.16.x with jasmine-reporters

See original GitHub issue

So this is the last passing test of my project: https://travis-ci.org/ahmednuaman/radian/jobs/16657205#L576

In the logs it’s installing v0.15.0 and the build is all good. But in the next build it uses v0.16.1 and it fails: https://travis-ci.org/ahmednuaman/radian/jobs/16786505#L588

The error is:

>> 
>> /home/travis/build/ahmednuaman/radian/node_modules/jasmine-reporters/src/jasmine.console_reporter.js:2
>> if (! jasmine) {
>> ^
>> ReferenceError: jasmine is not defined

And so on.

So I uninstall protractor, clean the npm cache and then install protractor@0.15.0 but I still get them same issue. Something’s afoot. So I had a look at the release log and decided to install 6a73a25 (npm install -g git+ssh://git@github.com:angular/protractor.git\#6a73a25) and it works.

I’m gonna have a look through the latest releases and see what’s causing this issue but if you guys can fix it in the mean time that’ll be awesome.

Thanks for all the hard work.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
juliemrcommented, Jan 12, 2014

You’re right, this is a breaking change that was not listed. Thanks for catching!

TL;DR - fix by moving require('jasmine-reporters'); into onPrepare

The cause: in introducing Mocha as a framework option, jasmine is now not loaded until right before the onPrepare - so it’s not available when the config file is first loaded. jasmine-reporters assumes that jasmine is on the global when it’s loaded, which causes the issue you’re seeing.

I will update the example file and add a breaking change note to the changelog!

0reactions
mcalthropcommented, Jan 15, 2014

Looks like the @juliemr has already committed the change here: https://github.com/angular/protractor/commit/9c86a27c15cf2c9f60aae0c002b8fc98177bf3be. Sorry!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on jasmine-node side · Issue #63 - GitHub
A primary issue here is that your jasmine-reporters version was bumped from 0.4 to 2.0. These are incompatible updates. Jasmine-reporters@ 0.4 ...
Read more >
Errors in karma-jasmine when setting seed : r/Angular2 - Reddit
Hey y'all I'm running tests with karma-jasmine in an Angular application and I want to rerun them always in a specific order, i.e., ......
Read more >
Jasmine & jasmine-reporters on nodejs missing output
The tests run, but i don't get any output via the jasmine-reporters. The logging shows the line '16 specs, 0 failures' but no...
Read more >
jasmine-reporters - npm
Jasmine Reporters is a collection of javascript jasmine.Reporter classes that can be used with the JasmineBDD testing framework. Included ...
Read more >
BEST PRACTICES IN RESOLVING EMPLOYMENT ... - ILO
in Resolving Employment Disputes in International Organizations. Conference Proceedings,. ILO Geneva, 15-16 September 2014. Edited by Annika Talvik.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found