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
Context - working an Atom.io package, specifically a code linter and the tests make liberal use of Sinon.
When using a stub it throws:
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
at createProxy (/Users/doug/Projects/Sinon.JS/lib/sinon/spy.js:86:86)
at Function.create (/Users/doug/Projects/Sinon.JS/lib/sinon/spy.js:145:29)
at Function.create (/Users/doug/Projects/Sinon.JS/lib/sinon/stub.js:86:42)
at Object.stub (/Users/doug/Projects/Sinon.JS/lib/sinon/stub.js:43:32)
at [object Object].<anonymous> (/Users/doug/Projects/linter/spec/linter-spec.coffee:14:31)
I am also developing specs for my package in Atom that are trying to stub the fs. I too get the original unsafe-eval message and when using the loophole package I get reset undefined! I'd like to be able to stub this!
Sinon version: 1.13.0 (master)
Environment: OSX / Atom Package Manager (apm 0.142.0) / node 0.10.35
Context - working an Atom.io package, specifically a code linter and the tests make liberal use of Sinon.
When using a stub it throws:
Found one attempt at a solution called loophole but it has issues.
Looking for any advice / suggestions?
The text was updated successfully, but these errors were encountered: