Skip to content

Commit b281163

Browse files
authored
feat(mutations): add Math method expression mutants (#4076)
1 parent 08608b1 commit b281163

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/instrumenter/src/mutators/method-expression-mutator.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const replacements = new Map([
2020
['toLowerCase', 'toUpperCase'],
2121
['trim', null],
2222
['trimEnd', 'trimStart'],
23+
['min', 'max'],
2324
]);
2425

2526
for (const [key, value] of Array.from(replacements)) {

packages/instrumenter/test/unit/mutators/method-expression-mutator.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ describe(sut.name, () => {
122122
['toLocaleLowerCase', 'toLocaleUpperCase'],
123123
['toLowerCase', 'toUpperCase'],
124124
['trimEnd', 'trimStart'],
125+
['min', 'max'],
125126
]) {
126127
it(`should replace ${key} with ${value}`, () => {
127128
expectJSMutation(sut, `text.${key}();`, `text.${value}();`);

0 commit comments

Comments
 (0)