Interesting issue with v0.16.x with jasmine-reporters
See original GitHub issueSo 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:
- Created 10 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
You’re right, this is a breaking change that was not listed. Thanks for catching!
TL;DR - fix by moving
require('jasmine-reporters');
intoonPrepare
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!
Looks like the @juliemr has already committed the change here: https://github.com/angular/protractor/commit/9c86a27c15cf2c9f60aae0c002b8fc98177bf3be. Sorry!