@hughescr/stryker-bun-runner 1.7.1 → 1.8.0
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 +339 -25
- package/dist/index.d.ts +77 -9
- package/dist/index.js +1766 -1146
- package/dist/templates/coverage-preload.js +6 -2
- package/dist/templates/import-scan.js +1644 -21
- package/package.json +25 -19
|
@@ -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(
|
|
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
|
}
|