jasmine-reporters: protractor 2.0 fails with `Cannot read property '_failures' of undefined`
I want to use the jasmine-reports with the protractor 2.0, but I’m getting an error:
/Dev/project/node_modules/jasmine-reporters/src/junit_reporter.js:154
if (isFailed(spec)) { spec._suite._failures++; }
^
TypeError: Cannot read property '_failures' of undefined
I checked the ‘spec’ object, it’s like this currently (no _suite property)
{ id: 'spec0',
description: 'should contain basic identifiers',
fullName: 'episode: TC14235 required fields should contain basic identifiers',
failedExpectations:
[ { matcherName: '',
message: 'Failed: undefined is not a function',
stack: 'Error: Failed: undefined is not a function\n at stack (/Dev/project/node_modules/protractor/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1441:17)\n ...
passed: false,
expected: '',
actual: '' } ],
passedExpectations: [],
status: 'failed',
_endTime: Thu Apr 16 2015 10:42:18 GMT-0400 (EDT) }
May be I’m doing something not supported in the 2.0?
Thanks
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 27
Commits related to this issue
- Quick-Fix for #94 This is a propably not very nice quick-fix for issue #94. Works however until it's fixed correctly. — committed to irrenhaus/jasmine-reporters by irrenhaus 9 years ago
- + deploying quick fix for https://github.com/larrymyers/jasmine-reporters/issues/94 — committed to reppners/jasmine-reporters by deleted user 9 years ago
- + deploying quick fix for https://github.com/larrymyers/jasmine-reporters/issues/94 — committed to reppners/jasmine-reporters by deleted user 9 years ago
- + deploying quick fix for larrymyers#94, adding delegate for being able to modify the suite — committed to reppners/jasmine-reporters by deleted user 9 years ago
The solution for this is pretty simple:
onPrepareshould return the promise and so protractor will wait for the promise to resolve before going on to running the tests: