module-spec 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/CHANGELOG.md +5 -0
- package/lib/mutation.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
- `mutate` names every live mutant. When two shared a file and a change, such as two
|
|
6
|
+
`StringLiteral: ""`, it named only the first, so a module showed 20 of its 70.
|
|
7
|
+
|
|
3
8
|
## 0.2.1
|
|
4
9
|
|
|
5
10
|
- Under vitest, a live mutant of a module-level constant or regex runs again in a fresh vitest
|
package/lib/mutation.js
CHANGED
|
@@ -68,8 +68,9 @@ export function judge(accepted, survivors, accept) {
|
|
|
68
68
|
for (const entry of accepted) left.set(keyOf(entry), (left.get(keyOf(entry)) ?? 0) + 1);
|
|
69
69
|
const fresh = survivors.filter((survivor) => {
|
|
70
70
|
const count = left.get(keyOf(survivor)) ?? 0;
|
|
71
|
+
if (count === 0) return true;
|
|
71
72
|
left.set(keyOf(survivor), count - 1);
|
|
72
|
-
return
|
|
73
|
+
return false;
|
|
73
74
|
});
|
|
74
75
|
return { failed: fresh.length > 0, fresh };
|
|
75
76
|
}
|
package/package.json
CHANGED