targeted-mutation 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/package.json +5 -5
- package/src/standard-plan.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# targeted-mutation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/targeted-mutation)
|
|
4
|
+
[](https://github.com/t-k/targeted-mutation-ts/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
**Targeted mutation testing for JavaScript and TypeScript**: `targeted-mutation` finds the tests your suite is missing. It watches the values your tests actually pass through comparisons, tries the smallest wrong implementation those values cannot tell apart from yours, and prints the test that would catch it.
|
|
4
8
|
|
|
5
9
|
```ts
|
|
6
10
|
export const isAdult = (age: number) => age >= 18;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "targeted-mutation",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Find the tests a JavaScript or TypeScript suite is missing by trying small, targeted source edits against it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mutation-testing",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"NOTICE"
|
|
44
44
|
],
|
|
45
45
|
"optionalDependencies": {
|
|
46
|
-
"@targeted-mutation/tmt-darwin-arm64": "0.2.
|
|
47
|
-
"@targeted-mutation/tmt-darwin-x64": "0.2.
|
|
48
|
-
"@targeted-mutation/tmt-linux-arm64": "0.2.
|
|
49
|
-
"@targeted-mutation/tmt-linux-x64": "0.2.
|
|
46
|
+
"@targeted-mutation/tmt-darwin-arm64": "0.2.2",
|
|
47
|
+
"@targeted-mutation/tmt-darwin-x64": "0.2.2",
|
|
48
|
+
"@targeted-mutation/tmt-linux-arm64": "0.2.2",
|
|
49
|
+
"@targeted-mutation/tmt-linux-x64": "0.2.2"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/src/standard-plan.mjs
CHANGED
|
@@ -147,7 +147,7 @@ export function assessTrial(trial, expectedTests, hitLimit) {
|
|
|
147
147
|
}
|
|
148
148
|
if (hitCount > 0 && ['failed', 'interrupted'].includes(reason) && failed.length &&
|
|
149
149
|
failed.every(test => expectedTests.has(test.id)) && [...expectedTests].every(([id, test]) =>
|
|
150
|
-
registered.has(id) ||
|
|
150
|
+
registered.has(id) || !collectedModules.has(moduleKey(test)))) {
|
|
151
151
|
return { status: 'killed', tests: failed.map(({ id, name, file, project }) => ({ id, name, file, project })) };
|
|
152
152
|
}
|
|
153
153
|
if (hitCount > 0 && reason === 'passed' && !failed.length && [...expectedTests.keys()].every(id => actualPassed.has(id))) {
|