-
Notifications
You must be signed in to change notification settings - Fork 257
Closed
Labels
🐛 BugSomething isn't workingSomething isn't working
Milestone
Description
Summary
Today in the instrumented code there's new Function('return this') all over the place. This isn't compatible with some environments that disable eval (e.g. Cloudflare workers). Is it possible to leverage globalThis instead (even if there's reason for it not to be a default, maybe for it to be a configurable option?).
Today if you load a Stryker mutation under Workers it fails with
Stryker config
// @ts-check
/** @type {import('@stryker-mutator/api/core').PartialStrykerOptions} */
process.env.STRYKER = '1'
const config = {
_comment:
"This config was generated using 'stryker init'. Please take a look at: https://stryker-mutator.io/docs/stryker-js/configuration/ for more information.",
packageManager: "npm",
reporters: ["html", "clear-text", "progress"],
checkers: ["typescript"],
tsconfigFile: "tests/tsconfig.json",
coverageAnalysis: "perTest",
commandRunner: { command: "npm run tests" },
};
export default config;Test runner config
N/A
Stryker environment
npm ls | grep stryker
├── @stryker-mutator/[email protected]
├── @stryker-mutator/[email protected]
Using mocha 10 but that's not really relevant.
Metadata
Metadata
Assignees
Labels
🐛 BugSomething isn't workingSomething isn't working