Closed msteller-connyun closed 4 years ago
This will ultimately be addressed via #208. This will allow options coverageGlobalScopeFunc: false, coverageGlobalScope: 'window'
- which should cause the instrumented code to set global
as follows:
var global = window
Uncaught 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' 'wasm-unsafe-eval'".
getting the above error because of var global = new Function("return this")()
, anyway to solve this?
coverageGlobalScopeFunc: false, coverageGlobalScope: 'window'
setting these options causes another babel plugin (vanilla-extract
) to fail with this error: ReferenceError: window is not defined
. does anyone know a workaround?
Hey,
as soon I add the istanbul plugin to my babel configuration
A
new Function
is added to the code:which violates our CSP rules.