@hughescr/stryker-bun-runner 1.7.1 → 1.7.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.
@@ -341,6 +341,9 @@ function formatSyncNotReadyMessage(syncPort, problem) {
341
341
  "would not be seen by the runner's inspector, so their results and per-test coverage would be lost."
342
342
  ].join(" ");
343
343
  }
344
+ function formatDrainRequest(startedTests) {
345
+ return `drain-request ${startedTests}`;
346
+ }
344
347
  var PRELOAD_TIMINGS_ENV = "__STRYKER_PRELOAD_TIMINGS__";
345
348
  function preloadEpochNow() {
346
349
  return performance.timeOrigin + performance.now();
@@ -946,6 +949,7 @@ var discovering = plan?.mode === "discover";
946
949
  var shouldCollectCoverage2 = shouldCollectCoverage(config) || discovering;
947
950
  var ws = null;
948
951
  var DRAIN_ACK_TIMEOUT_MS = 40000;
952
+ var DRAIN_HOOK_TIMEOUT_MS = DRAIN_ACK_TIMEOUT_MS + 20000;
949
953
  var perFileCounters = new Map;
950
954
  function extractFilePrefix(bunMain) {
951
955
  if (!bunMain) {
@@ -1066,7 +1070,7 @@ var drainAndClose = async () => {
1066
1070
  if (timings) {
1067
1071
  timings["at.drainRequested"] = nowEpoch();
1068
1072
  }
1069
- wsForDrain.send("drain-request");
1073
+ wsForDrain.send(formatDrainRequest(startedTests));
1070
1074
  } catch {
1071
1075
  clearTimeout(timeout);
1072
1076
  resolve();
@@ -1137,5 +1141,5 @@ if (shouldCollectCoverage2) {
1137
1141
  lateHits.length = 0;
1138
1142
  writeDryRunRecord();
1139
1143
  await drainAndClose();
1140
- });
1144
+ }, DRAIN_HOOK_TIMEOUT_MS);
1141
1145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hughescr/stryker-bun-runner",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Stryker mutation testing test runner plugin for Bun (bun test), with per-test coverage",
5
5
  "keywords": [
6
6
  "stryker",