-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(instrumenter): support anonymous function names (#2388)
Do a best-effort attempt to minimize side effects from instrumentation by maintaining the `fn.name` property when placing mutants in code. Instrument these: ```ts const foo = function () { } const bar = () => {} const Baz = class { } const foo = { bar: function () { } } ``` Like this: ```ts const foo = true? function foo () { }: ...; const bar = true? (() => { const bar = () =>{}; return bar } {})() : ...; const Baz = true? class Baz { } : ...; const foo = true? function bar() {} ``` Fixes #2362
- Loading branch information
Showing
3 changed files
with
138 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters