targeted-mutation 0.2.0 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "targeted-mutation",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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.0",
47
- "@targeted-mutation/tmt-darwin-x64": "0.2.0",
48
- "@targeted-mutation/tmt-linux-arm64": "0.2.0",
49
- "@targeted-mutation/tmt-linux-x64": "0.2.0"
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"
50
50
  }
51
51
  }
@@ -73,7 +73,9 @@ async function besideSession(project, files, options, run, profile, stopsSession
73
73
  mutators: profile, lines: options.lines, since: options.since, config: options.config, test: options.test,
74
74
  'copy-exclude': options['copy-exclude'], dialect: options.dialect, 'isolated-trials': options['isolated-trials'],
75
75
  concurrency: options.concurrency, 'verify-trials': options['verify-trials'], timeout: options.timeout, signal: stop.signal, extras,
76
- shardKeys: options.shardKeys, checkpointStore: options.checkpointStore, 'exclude-rule': options['exclude-rule'],
76
+ ...(options.shardKeys ? { shardKeys: options.shardKeys } : {}),
77
+ ...(options.checkpointStore ? { checkpointStore: options.checkpointStore } : {}),
78
+ ...(options['exclude-rule'] ? { 'exclude-rule': options['exclude-rule'] } : {}),
77
79
  }).then(report => ({ report }), error => ({ error }));
78
80
  let prepared;
79
81
  try {
@@ -138,7 +138,10 @@ export function assessTrial(trial, expectedTests, hitLimit) {
138
138
  }
139
139
  if (errors.length) {
140
140
  if (hitCount > 0) {
141
- return { status: 'killed', killedBy: 'unhandled-error', statusReason: errors.join('\n') };
141
+ const killerTests = failed.length
142
+ ? failed.map(({ id, name, file, project }) => ({ id, name, file, project }))
143
+ : [...expectedTests.values()].map(({ id, name, file, project }) => ({ id, name, file, project }));
144
+ return { status: 'killed', killedBy: 'unhandled-error', tests: killerTests, statusReason: errors.join('\n') };
142
145
  }
143
146
  return { status: 'error', statusReason: errors.join('\n') };
144
147
  }