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 CHANGED
@@ -1,6 +1,10 @@
1
1
  # targeted-mutation
2
2
 
3
- `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.
3
+ [![npm](https://img.shields.io/npm/v/targeted-mutation.svg)](https://www.npmjs.com/package/targeted-mutation)
4
+ [![CI](https://github.com/t-k/targeted-mutation-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/t-k/targeted-mutation-ts/actions/workflows/ci.yml)
5
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](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.1",
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.1",
47
- "@targeted-mutation/tmt-darwin-x64": "0.2.1",
48
- "@targeted-mutation/tmt-linux-arm64": "0.2.1",
49
- "@targeted-mutation/tmt-linux-x64": "0.2.1"
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
  }
@@ -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) || reason === 'interrupted' && !collectedModules.has(moduleKey(test)))) {
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))) {