You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
When running unit tests using karma and PhantomJS 1.9.2, if an exception is raised, I get the following:
PhantomJS 1.9.2 (Mac OS X) app.api
TypeError: Attempted to assign to readonly property.
at workFn (/Users/project/app/bower_components/angular-mocks/angular-mocks.js:2122)
at /Users/project/node_modules/mocha/mocha.js:4263
at /Users/project/node_modules/mocha/mocha.js:4635
at /Users/project/node_modules/mocha/mocha.js:4694
at next (/Users/project/node_modules/mocha/mocha.js:4561)
at /Users/project/node_modules/mocha/mocha.js:4570
at next (/Users/project/node_modules/mocha/mocha.js:4514)
at /Users/project/node_modules/mocha/mocha.js:4538
at timeslice (/Users/project/node_modules/mocha/mocha.js:5531)
I'll add that this only started happening when "use strict" was added in this commit.
And by chance I ran across this bit of code elsewhere in the codebase earlier today, which seems to be about this same problem. Not sure if it's applicable to the mocks problem.
I'm seeing this as well. It's a bit of a hack, but wrapping the bit that writes to e.stack in try/catch keeps the functionality in browsers that support it (it works fine in Chrome, for example), while avoiding breaking things in PhantomJS
When running unit tests using karma and PhantomJS 1.9.2, if an exception is raised, I get the following:
Looks like e.stack shouldn't be written to.
The text was updated successfully, but these errors were encountered: