where.js icon indicating copy to clipboard operation
where.js copied to clipboard

Jasmine strategy broken for karma-jasmine with jasmine 2.x

Open bluesliverx opened this issue 8 years ago • 5 comments

I'm encountering this error when trying to use the jasmine strategy to report errors.

        TypeError: undefined is not a constructor (evaluating 'this.expectationResultFactory(data)') in /home/someone/Documents/Projects/someproject/node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 330)
        addExpectationResult@/home/someone/Documents/Projects/someproject/node_modules/where.js/strategy/jasmine-strategy.js:69:34
        anonymous
        testJasmine@/home/someone/Documents/Projects/someproject/node_modules/where.js/strategy/jasmine-strategy.js:75:19
        where@/home/someone/Documents/Projects/someproject/node_modules/where.js/where.js:182:20
        /home/someone/Documents/Projects/someproject/test/unit/directives/my.spec.js:35:8

Would it be possible to create a jasmine spec reporter to do this same thing in a more jasmine accepted way? If you can't access what you need from a reporter, I understand. I've tried poking around in the code, but I'm not seeing where the breakdown is. Perhaps in the configuration of jasmine that karma-jasmine does? I've tried with every major jasmine-core version from 2.0.x (failed for another reason with karma-jasmine) to 2.4.x. 2.1.x+ failed with this error message.

bluesliverx avatar Apr 12 '16 21:04 bluesliverx