vitest 5.1.0-beta.1 → 5.1.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.
Files changed (68) hide show
  1. package/dist/browser.d.ts +8 -6
  2. package/dist/browser.js +10 -10
  3. package/dist/chunks/{base.PJyN9N0u.js → base.C2su7_N0.js} +16 -21
  4. package/dist/chunks/{browser.d.D7a15z82.d.ts → browser.d.B-QwH_F6.d.ts} +3 -3
  5. package/dist/chunks/{cac.Ccf5Je_F.js → cac.BK306qhQ.js} +29 -22
  6. package/dist/chunks/{cli-api.DE22LIzq.js → cli-api.D6E8EtSi.js} +990 -166
  7. package/dist/chunks/{config.d.BgktgHfG.d.ts → config.d.BpJq6tRA.d.ts} +43 -2
  8. package/dist/chunks/{console.DrMPSuFo.js → console.VJUxd1rM.js} +3 -3
  9. package/dist/chunks/{coverage.-bm5IxnW.js → coverage.9iqXE2gN.js} +1 -1
  10. package/dist/chunks/{coverage.cTDc4uSS.js → coverage.jGCktcGP.js} +1 -1
  11. package/dist/chunks/{creator.BQ3onxbh.js → creator.CoOCr85O.js} +17 -15
  12. package/dist/chunks/{display.BlTmubjj.js → display.Cj2h2zsY.js} +1 -1
  13. package/dist/chunks/{doctor.CPlMs7-y.js → doctor.SRjZIZuA.js} +2 -2
  14. package/dist/chunks/{environment.d.CbTLsZSj.d.ts → environment.d.rlpAM-ON.d.ts} +1 -1
  15. package/dist/chunks/{globals.TipXUFcZ.js → globals.Mxora3_v.js} +11 -10
  16. package/dist/chunks/{index.BFXLpwll.js → index.C7Nn66Gy.js} +79 -41
  17. package/dist/chunks/{index.DmDMHCg8.js → index.CAmut2NG.js} +25 -1
  18. package/dist/chunks/{index.BXttT2gP.js → index.DNcttN5a.js} +288 -437
  19. package/dist/chunks/{index.B03wg4V0.js → index.Da_szXbS.js} +5 -5
  20. package/dist/chunks/{index.D14IAvnE.js → index.ER9afepi.js} +269 -141
  21. package/dist/chunks/{index.D0heQG4v.js → index.Or9psEGe.js} +1 -1
  22. package/dist/chunks/{init-forks.BL1E3__4.js → init-forks.q4IoGYZe.js} +7 -1
  23. package/dist/chunks/{init-threads.CYXAGzKQ.js → init-threads.Bf1Frg9S.js} +1 -1
  24. package/dist/chunks/{init.DVorxUyL.js → init.dGO4K2C0.js} +17 -9
  25. package/dist/chunks/{inspector.CvyFGlXm.js → inspector.D6o1NPo1.js} +12 -1
  26. package/dist/chunks/{module-dependencies.CwNPkcV4.js → module-dependencies._2Eei3FO.js} +1 -1
  27. package/dist/chunks/{modules.BJuCwlRJ.js → moduleSourceMap.Dp1WduWi.js} +31 -1
  28. package/dist/chunks/{native.cdzHIdmv.js → native.D5q1ylZC.js} +3 -2
  29. package/dist/chunks/{nativeModuleMocker.3uBcOd84.js → nativeModuleMocker.ihb3q7Cg.js} +6 -4
  30. package/dist/chunks/{nativeModuleRunner.xi64Afb2.js → nativeModuleRunner.9xPIMzi7.js} +1 -1
  31. package/dist/chunks/{node.uQulW0ei.js → node.B9mkVmLH.js} +1 -1
  32. package/dist/chunks/{pathe.M-eThtNZ.Ba-7h1rE.js → pathe.M-eThtNZ.zq3TM4NT.js} +1 -1
  33. package/dist/chunks/{plugin.d.olEn8IL9.d.ts → plugin.d.Du7hHZwb.d.ts} +115 -41
  34. package/dist/chunks/{plugins.DPQHVT0p.js → plugins.BPruPOR8.js} +1 -1
  35. package/dist/chunks/rawSnapshot.DvoRLRNr.js +356 -0
  36. package/dist/chunks/{resolver.CtCcxIy1.js → resolver.BzpmeQeT.js} +1 -1
  37. package/dist/chunks/{rpc.BV0XpJ5q.js → rpc.CNYWPa97.js} +3 -19
  38. package/dist/chunks/{rpc.d.DGFP7vWr.d.ts → rpc.d.DHfuwqP0.d.ts} +2 -2
  39. package/dist/chunks/{run.BfrMbGVD.js → run.zBhXlcZQ.js} +118 -51
  40. package/dist/chunks/{setup-common.llxJkJaD.js → setup-common.wwc_NYRJ.js} +3 -3
  41. package/dist/chunks/{source-map.BjWcsIL9.js → source-map.DPHGMWvM.js} +14 -14
  42. package/dist/chunks/{source-map.d.C5A_Tr6V.d.ts → source-map.d.xB6_75fl.d.ts} +2 -1
  43. package/dist/chunks/{spy.DDMXghXv.js → spy.BO0hTE3G.js} +76 -53
  44. package/dist/chunks/{task-utils.d.BUh7ylUT.d.ts → task-utils.d.DgSjIb7r.d.ts} +1 -1
  45. package/dist/chunks/{utils.DSfl_w8V.js → utils.sAsh2ClK.js} +7 -8
  46. package/dist/chunks/{vm.Cwj01UFE.js → vm.agn4qnmT.js} +15 -13
  47. package/dist/chunks/{worker.d.gsA26mmR.d.ts → worker.d.BigfbIsH.d.ts} +3 -3
  48. package/dist/cli.js +2 -2
  49. package/dist/config.d.ts +8 -8
  50. package/dist/index.d.ts +17 -12
  51. package/dist/index.js +11 -10
  52. package/dist/module-evaluator.d.ts +3 -3
  53. package/dist/module-evaluator.js +1 -1
  54. package/dist/node.d.ts +12 -11
  55. package/dist/node.js +23 -19
  56. package/dist/runtime.d.ts +5 -4
  57. package/dist/runtime.js +7 -5
  58. package/dist/spy.js +1 -1
  59. package/dist/task-utils.js +7 -3
  60. package/dist/worker.d.ts +4 -4
  61. package/dist/worker.js +23 -21
  62. package/dist/workers/forks.js +24 -22
  63. package/dist/workers/runVmTests.js +20 -17
  64. package/dist/workers/threads.js +24 -22
  65. package/dist/workers/vmForks.js +16 -15
  66. package/dist/workers/vmThreads.js +16 -15
  67. package/dist/workers/watchdog.js +20 -0
  68. package/package.json +21 -21
@@ -1,8 +1,8 @@
1
- import { f as format, p as plugins } from './index.D0heQG4v.js';
1
+ import { f as format, p as plugins } from './index.Or9psEGe.js';
2
2
  import { $ } from './tinyrainbow.Do8I1XRG.js';
3
- import { s as stringify, f as format$1, a as formatRegExp, t as truncateString, i as inspect } from './display.BlTmubjj.js';
4
- import { p as deepClone, q as getOwnProperties, g as getType$1, u as isObject, v as filterOutComments, w as ordinal, e as createDefer, x as assertTypes, t as toArray, y as isNegativeNaN, z as unique, A as objectAttr } from './pathe.M-eThtNZ.Ba-7h1rE.js';
5
- import { d as diffSequences, b as serializeValue, p as parseStacktrace, a as getSafeTimers } from './source-map.BjWcsIL9.js';
3
+ import { s as stringify, f as format$1, a as formatRegExp, t as truncateString, i as inspect } from './display.Cj2h2zsY.js';
4
+ import { u as deepClone, v as getOwnProperties, g as getType$1, f as isObject, w as filterOutComments, x as ordinal, e as createDefer, y as assertTypes, t as toArray, z as isNegativeNaN, A as unique, B as objectAttr } from './pathe.M-eThtNZ.zq3TM4NT.js';
5
+ import { d as diffSequences, b as serializeValue, p as parseStacktrace, a as getSafeTimers } from './source-map.DPHGMWvM.js';
6
6
  import { createTaskName, createFileTask, calculateSuiteHash, interpretTaskModes, hasFailed } from '../task-utils.js';
7
7
 
8
8
  const RealDate = Date;
@@ -1212,7 +1212,23 @@ function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE_
1212
1212
  replacedExpected: expected
1213
1213
  };
1214
1214
  }
1215
- if (!isReplaceable(actual, expected)) return {
1215
+ if (isAsymmetricMatcher(expected)) {
1216
+ const sample = unwrapContainingMatcher(expected, actual);
1217
+ if (sample === void 0) return {
1218
+ replacedActual: actual,
1219
+ replacedExpected: expected
1220
+ };
1221
+ return replaceAsymmetricMatcher(actual, sample, actualReplaced, expectedReplaced);
1222
+ }
1223
+ if (isAsymmetricMatcher(actual)) {
1224
+ const sample = unwrapContainingMatcher(actual, expected);
1225
+ if (sample === void 0) return {
1226
+ replacedActual: actual,
1227
+ replacedExpected: expected
1228
+ };
1229
+ return replaceAsymmetricMatcher(sample, expected, actualReplaced, expectedReplaced);
1230
+ }
1231
+ if (actual === expected || !isReplaceable(actual, expected)) return {
1216
1232
  replacedActual: actual,
1217
1233
  replacedExpected: expected
1218
1234
  };
@@ -1226,35 +1242,67 @@ function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE_
1226
1242
  const expectedValue = expected[key];
1227
1243
  const actualValue = actual[key];
1228
1244
  if (isAsymmetricMatcher(expectedValue)) {
1229
- if (expectedValue.asymmetricMatch(actualValue))
1230
- // When matcher matches, replace expected with actual value
1231
- // so they appear the same in the diff
1232
- expected[key] = actualValue;
1233
- else if ("sample" in expectedValue && expectedValue.sample !== void 0 && isReplaceable(actualValue, expectedValue.sample)) {
1234
- // For container matchers (ArrayContaining, ObjectContaining), unwrap and recursively process
1235
- // Matcher doesn't match: unwrap but keep structure to show mismatch
1236
- const replaced = replaceAsymmetricMatcher(actualValue, expectedValue.sample, actualReplaced, expectedReplaced);
1237
- actual[key] = replaced.replacedActual;
1238
- expected[key] = replaced.replacedExpected;
1245
+ if (expectedValue.asymmetricMatch(actualValue)) {
1246
+ // When matcher matches, replace expected with actual value
1247
+ // so they appear the same in the diff
1248
+ expected[key] = actualValue;
1249
+ return;
1239
1250
  }
1240
1251
  } else if (isAsymmetricMatcher(actualValue)) {
1241
- if (actualValue.asymmetricMatch(expectedValue)) actual[key] = expectedValue;
1242
- else if ("sample" in actualValue && actualValue.sample !== void 0 && isReplaceable(actualValue.sample, expectedValue)) {
1243
- const replaced = replaceAsymmetricMatcher(actualValue.sample, expectedValue, actualReplaced, expectedReplaced);
1244
- actual[key] = replaced.replacedActual;
1245
- expected[key] = replaced.replacedExpected;
1252
+ if (actualValue.asymmetricMatch(expectedValue)) {
1253
+ actual[key] = expectedValue;
1254
+ return;
1246
1255
  }
1247
- } else if (isReplaceable(actualValue, expectedValue)) {
1248
- const replaced = replaceAsymmetricMatcher(actualValue, expectedValue, actualReplaced, expectedReplaced);
1249
- actual[key] = replaced.replacedActual;
1250
- expected[key] = replaced.replacedExpected;
1251
- }
1256
+ } else if (!isReplaceable(actualValue, expectedValue)) return;
1257
+ const replaced = replaceAsymmetricMatcher(actualValue, expectedValue, actualReplaced, expectedReplaced);
1258
+ if (replaced.replacedActual !== actualValue) actual[key] = replaced.replacedActual;
1259
+ if (replaced.replacedExpected !== expectedValue) expected[key] = replaced.replacedExpected;
1252
1260
  });
1253
1261
  return {
1254
1262
  replacedActual: actual,
1255
1263
  replacedExpected: expected
1256
1264
  };
1257
1265
  }
1266
+ function isContainingMatcher(value) {
1267
+ if (!isAsymmetricMatcher(value)) return false;
1268
+ const name = value.toString();
1269
+ return name === "ObjectContaining" || name === "ArrayContaining";
1270
+ }
1271
+ // Show a failed ObjectContaining/ArrayContaining as the plain value it checks,
1272
+ // so the diff points at the mismatched entries
1273
+ function unwrapContainingMatcher(matcher, other) {
1274
+ // a matching matcher fails only with `.not`, keep it as is
1275
+ if (!isContainingMatcher(matcher) || matcher.asymmetricMatch(other)) return;
1276
+ const sample = matcher.sample;
1277
+ if (matcher.toString() === "ArrayContaining") return Array.isArray(sample) && Array.isArray(other) ? fillArrayContaining(matcher, sample, other) : void 0;
1278
+ if (getType$1(sample) === "Object" && getType$1(other) === "Object") {
1279
+ // keys that the matcher does not check are taken from the other side
1280
+ const filled = Object.create(Object.getPrototypeOf(other), Object.getOwnPropertyDescriptors(other));
1281
+ return Object.defineProperties(filled, Object.getOwnPropertyDescriptors(sample));
1282
+ }
1283
+ }
1284
+ // Keep the other array in its order and add the items that it misses
1285
+ function fillArrayContaining(matcher, sample, other) {
1286
+ // check one item with the same equality as the matcher
1287
+ const includes = (array, item) => Object.create(matcher, { sample: { value: [item] } }).asymmetricMatch(array);
1288
+ const found = [];
1289
+ const missing = [];
1290
+ for (const item of sample) if (includes(other, item)) found.push(item);
1291
+ else missing.push(item);
1292
+ const unmatched = other.map((_, index) => index).filter((index) => !includes(found, other[index]));
1293
+ const filled = [...other];
1294
+ for (const item of missing) {
1295
+ // put an object in place of an unmatched object to show the difference inside it
1296
+ const position = unmatched.findIndex((index) => isDiffableInside(item, other[index]));
1297
+ if (position === -1) filled.push(item);
1298
+ else filled[unmatched.splice(position, 1)[0]] = item;
1299
+ }
1300
+ return filled;
1301
+ }
1302
+ function isDiffableInside(expected, actual) {
1303
+ if (isAsymmetricMatcher(expected)) return isContainingMatcher(expected) && isReplaceable(actual, expected.sample);
1304
+ return isReplaceable(actual, expected);
1305
+ }
1258
1306
  function getLabelPrinter(...strings) {
1259
1307
  const maxLength = strings.reduce((max, string) => string.length > max ? string.length : max, 0);
1260
1308
  return (string) => `${string}: ${" ".repeat(maxLength - string.length)}`;
@@ -1384,6 +1432,12 @@ class TestRunAbortError extends Error {
1384
1432
  this.reason = reason;
1385
1433
  }
1386
1434
  }
1435
+ class TestTimeoutError extends Error {
1436
+ name = "TestTimeoutError";
1437
+ }
1438
+ class HookTimeoutError extends Error {
1439
+ name = "HookTimeoutError";
1440
+ }
1387
1441
  class FixtureDependencyError extends Error {
1388
1442
  name = "FixtureDependencyError";
1389
1443
  }
@@ -1591,8 +1645,12 @@ class TestFixtures {
1591
1645
  const cleanupFnArrayMap = /* @__PURE__ */ new WeakMap();
1592
1646
  async function callFixtureCleanup(context) {
1593
1647
  const cleanupFnArray = cleanupFnArrayMap.get(context) ?? [];
1594
- for (const cleanup of cleanupFnArray.reverse()) await cleanup();
1595
1648
  cleanupFnArrayMap.delete(context);
1649
+ await runFixtureCleanups(cleanupFnArray);
1650
+ }
1651
+ // one context at a time, so that teardowns do not overlap and keep their order on every run
1652
+ async function callFixtureCleanups(contexts) {
1653
+ await runFixtureCleanups(contexts.map((context) => () => callFixtureCleanup(context)));
1596
1654
  }
1597
1655
  /**
1598
1656
  * Returns the current number of cleanup functions registered for the context.
@@ -1609,12 +1667,17 @@ function getFixtureCleanupCount(context) {
1609
1667
  async function callFixtureCleanupFrom(context, fromIndex) {
1610
1668
  const cleanupFnArray = cleanupFnArrayMap.get(context);
1611
1669
  if (!cleanupFnArray || cleanupFnArray.length <= fromIndex) return;
1612
- // Get items added after the checkpoint
1613
- const toCleanup = cleanupFnArray.slice(fromIndex);
1614
- // Clean up in reverse order
1615
- for (const cleanup of toCleanup.reverse()) await cleanup();
1616
- // Remove cleaned up items from the array, keeping items before checkpoint
1617
- cleanupFnArray.length = fromIndex;
1670
+ await runFixtureCleanups(cleanupFnArray.splice(fromIndex));
1671
+ }
1672
+ async function runFixtureCleanups(cleanups) {
1673
+ const errors = [];
1674
+ for (const cleanup of cleanups.reverse()) try {
1675
+ await cleanup();
1676
+ } catch (error) {
1677
+ errors.push(error);
1678
+ }
1679
+ if (errors.length === 1) throw errors[0];
1680
+ if (errors.length > 1) throw new AggregateError(errors, "Multiple fixture teardowns failed.");
1618
1681
  }
1619
1682
  const contextHasFixturesCache = /* @__PURE__ */ new WeakMap();
1620
1683
  function withFixtures(fn, options) {
@@ -2699,7 +2762,7 @@ function createSuiteCollector(name, factory = () => {}, mode, each, suiteOptions
2699
2762
  Error.stackTraceLimit = 10;
2700
2763
  const stackTraceError = /* @__PURE__ */ new Error("STACK_TRACE_ERROR");
2701
2764
  Error.stackTraceLimit = limit;
2702
- if (handler) setFn(task, withTimeout(withCancel(withAwaitAsyncAssertions(withFixtures(handler, { context }), task), task.context.signal), timeout, false, stackTraceError, (_, error) => abortIfTimeout([context], error)));
2765
+ if (handler) setFn(task, withTimeout(withCancel(withAwaitAsyncAssertions(withFixtures(handler, { context }), task), context), timeout, false, stackTraceError, (_, error) => abortIfTimeout([context], error)));
2703
2766
  if (runner.config.includeTaskLocation) {
2704
2767
  const stack = findTestFileStackTrace(currentTestFilepath, stackTraceError);
2705
2768
  if (stack) task.location = {
@@ -3328,8 +3391,9 @@ catch (error) {
3328
3391
  });
3329
3392
  };
3330
3393
  }
3331
- function withCancel(fn, signal) {
3394
+ function withCancel(fn, context) {
3332
3395
  return function runWithCancel(...args) {
3396
+ const signal = context.signal;
3333
3397
  return new Promise((resolve, reject) => {
3334
3398
  const onAbort = () => reject(signal.reason);
3335
3399
  signal.addEventListener("abort", onAbort, { once: true });
@@ -3361,16 +3425,18 @@ function abortIfTimeout([context], error) {
3361
3425
  function abortContextSignal(context, error) {
3362
3426
  abortControllers.get(context)?.abort(error);
3363
3427
  }
3428
+ function resetContextSignal(context) {
3429
+ // the next attempt of a cancelled run starts aborted
3430
+ if (abortControllers.get(context)?.signal.reason instanceof TestRunAbortError) return;
3431
+ const abortController = new AbortController();
3432
+ abortControllers.set(context, abortController);
3433
+ context.signal = abortController.signal;
3434
+ }
3364
3435
  function createTestContext(test, runner) {
3365
3436
  const context = function() {
3366
3437
  throw new Error("done() callback is deprecated, use promise instead");
3367
3438
  };
3368
- let abortController = abortControllers.get(context);
3369
- if (!abortController) {
3370
- abortController = new AbortController();
3371
- abortControllers.set(context, abortController);
3372
- }
3373
- context.signal = abortController.signal;
3439
+ resetContextSignal(context);
3374
3440
  context.task = test;
3375
3441
  context.skip = (condition, note) => {
3376
3442
  if (condition === false)
@@ -3404,11 +3470,11 @@ function createTestContext(test, runner) {
3404
3470
  });
3405
3471
  context.onTestFailed = (handler, timeout) => {
3406
3472
  test.onFailed ||= [];
3407
- test.onFailed.push(withTimeout(handler, timeout ?? runner.config.hookTimeout, true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), (_, error) => abortController.abort(error)));
3473
+ test.onFailed.push(withTimeout(handler, timeout ?? runner.config.hookTimeout, true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), (_, error) => abortContextSignal(context, error)));
3408
3474
  };
3409
3475
  context.onTestFinished = (handler, timeout) => {
3410
3476
  test.onFinished ||= [];
3411
- test.onFinished.push(withTimeout(handler, timeout ?? runner.config.hookTimeout, true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), (_, error) => abortController.abort(error)));
3477
+ test.onFinished.push(withTimeout(handler, timeout ?? runner.config.hookTimeout, true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), (_, error) => abortContextSignal(context, error)));
3412
3478
  };
3413
3479
  return runner.extendTaskContext?.(context) || context;
3414
3480
  }
@@ -3418,8 +3484,8 @@ function makeTimeoutError(isHook, timeout, stackTraceError, pending) {
3418
3484
  const lastOperationSource = pending?.at(-1)?.source;
3419
3485
  if (lastOperationSource) stackTraceError = lastOperationSource;
3420
3486
  const message = `${isHook ? "Hook" : "Test"} timed out in ${timeout}ms${waiting}.\nIf this is a long-running ${isHook ? "hook" : "test"}, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
3421
- const error = new Error(message);
3422
- if (stackTraceError?.stack) error.stack = stackTraceError.stack.replace(stackTraceError.message, error.message);
3487
+ const error = isHook ? new HookTimeoutError(message) : new TestTimeoutError(message);
3488
+ if (stackTraceError?.stack) error.stack = stackTraceError.stack.replace(`${stackTraceError.name}: ${stackTraceError.message}`, `${error.name}: ${error.message}`);
3423
3489
  return error;
3424
3490
  }
3425
3491
 
@@ -3814,7 +3880,10 @@ function throttle(fn, ms) {
3814
3880
  return fn.apply(this, args);
3815
3881
  }
3816
3882
  // Make sure fn is still called even if there are no further calls
3817
- pendingCall ??= setTimeout(call.bind(this), ms, ...args);
3883
+ pendingCall ??= setTimeout(() => {
3884
+ pendingCall = void 0;
3885
+ call.apply(this, args);
3886
+ }, ms);
3818
3887
  };
3819
3888
  }
3820
3889
  // throttle based on summary reporter's DURATION_UPDATE_INTERVAL_MS
@@ -3885,6 +3954,7 @@ async function runTest(test, runner) {
3885
3954
  test.result.state = "run";
3886
3955
  const retry = getRetryCount(test.retry);
3887
3956
  for (let retryCount = 0; retryCount <= retry; retryCount++) {
3957
+ if (retryCount > 0 || repeatCount > 0) resetContextSignal(test.context);
3888
3958
  const attemptStart = now();
3889
3959
  const attemptStartTime = unixNow();
3890
3960
  const attemptErrorsStart = test.result.errors?.length ?? 0;
@@ -4110,10 +4180,7 @@ async function runSuite(suite, runner) {
4110
4180
  try {
4111
4181
  await $("suite.afterAll", () => callSuiteHook(suite, suite, "afterAll", runner, [suite]));
4112
4182
  if (beforeAllCleanups.length) await $("suite.cleanup", () => callCleanupHooks(runner, beforeAllCleanups));
4113
- if (suite.file === suite) {
4114
- const contexts = TestFixtures.getFileContexts(suite.file);
4115
- await Promise.all(contexts.map((context) => callFixtureCleanup(context)));
4116
- }
4183
+ if (suite.file === suite) await callFixtureCleanups(TestFixtures.getFileContexts(suite.file));
4117
4184
  } catch (e) {
4118
4185
  failTask(suite.result, e, runner.config._diffOptions);
4119
4186
  }
@@ -4196,7 +4263,7 @@ async function startTests(specs, runner) {
4196
4263
  };
4197
4264
  if (!workerRunners.has(runner)) {
4198
4265
  runner.onCleanupWorkerContext?.(async () => {
4199
- await Promise.all(Array.from(TestFixtures.getWorkerContexts(), (context) => callFixtureCleanup(context))).finally(() => {
4266
+ await callFixtureCleanups(Array.from(TestFixtures.getWorkerContexts())).finally(() => {
4200
4267
  TestFixtures.clearDefinitions();
4201
4268
  });
4202
4269
  });
@@ -4225,4 +4292,4 @@ async function publicCollect(specs, runner) {
4225
4292
  return files;
4226
4293
  }
4227
4294
 
4228
- export { createTagsFilter as A, validateTags as B, shuffle as C, TestSyntaxError as T, processError as a, printDiffOrStringify as b, createTaskCollector as c, diff as d, getCurrentSuite as e, createChainable as f, getCurrentTest as g, getHooks as h, getFn as i, afterAll as j, afterEach as k, aroundAll as l, matchesTags as m, aroundEach as n, beforeAll as o, publicCollect as p, beforeEach as q, describe as r, startTests as s, it as t, onTestFailed as u, onTestFinished as v, recordArtifact as w, suite as x, test as y, limitConcurrency as z };
4295
+ export { test as A, limitConcurrency as B, createTagsFilter as C, validateTags as D, shuffle as E, TestSyntaxError as T, processError as a, printDiffOrStringify as b, getCurrentTest as c, diff as d, recordArtifact as e, createTaskCollector as f, getRunningTests as g, getCurrentSuite as h, createChainable as i, getHooks as j, getFn as k, afterAll as l, matchesTags as m, afterEach as n, aroundAll as o, publicCollect as p, aroundEach as q, replaceAsymmetricMatcher as r, startTests as s, beforeAll as t, beforeEach as u, describe as v, it as w, onTestFailed as x, onTestFinished as y, suite as z };
@@ -1,5 +1,5 @@
1
- import { s as setSafeTimers } from './source-map.BjWcsIL9.js';
2
- import { a as addSerializer } from './plugins.DPQHVT0p.js';
1
+ import { s as setSafeTimers } from './source-map.DPHGMWvM.js';
2
+ import { a as addSerializer } from './plugins.BPruPOR8.js';
3
3
 
4
4
  let globalSetup = false;
5
5
  async function setupCommonEnv(config) {
@@ -7,7 +7,7 @@ async function setupCommonEnv(config) {
7
7
  if (globalSetup) return;
8
8
  globalSetup = true;
9
9
  setSafeTimers();
10
- if (config.globals) (await import('./globals.TipXUFcZ.js')).registerApiGlobally();
10
+ if (config.globals) (await import('./globals.Mxora3_v.js')).registerApiGlobally();
11
11
  }
12
12
  function setupDefines(config) {
13
13
  for (const key in config.defines) globalThis[key] = config.defines[key];
@@ -1,5 +1,5 @@
1
- import { g as getDefaultExportFromCjs } from './index.D0heQG4v.js';
2
- import { m as isPrimitive, o as notNullish, r as resolve$1 } from './pathe.M-eThtNZ.Ba-7h1rE.js';
1
+ import { g as getDefaultExportFromCjs } from './index.Or9psEGe.js';
2
+ import { p as isPrimitive, q as notNullish, r as resolve$1 } from './pathe.M-eThtNZ.zq3TM4NT.js';
3
3
 
4
4
  var build = {};
5
5
 
@@ -947,7 +947,7 @@ for (let i = 0; i < chars.length; i++) {
947
947
  intToChar[i] = c;
948
948
  charToInt[c] = i;
949
949
  }
950
- function decodeInteger(reader, relative) {
950
+ function decodeInteger(reader) {
951
951
  let value = 0;
952
952
  let shift = 0;
953
953
  let integer = 0;
@@ -957,12 +957,10 @@ function decodeInteger(reader, relative) {
957
957
  value |= (integer & 31) << shift;
958
958
  shift += 5;
959
959
  } while (integer & 32);
960
- const shouldNegate = value & 1;
961
- value >>>= 1;
962
- if (shouldNegate) {
963
- value = -2147483648 | -value;
964
- }
965
- return relative + value;
960
+ return value;
961
+ }
962
+ function decodeSign(num) {
963
+ return num & 1 ? -2147483648 | -(num >>> 1) : num >>> 1;
966
964
  }
967
965
  function hasMoreVlq(reader, max) {
968
966
  if (reader.pos >= max) return false;
@@ -1004,15 +1002,15 @@ function decode(mappings) {
1004
1002
  genColumn = 0;
1005
1003
  while (reader.pos < semi) {
1006
1004
  let seg;
1007
- genColumn = decodeInteger(reader, genColumn);
1005
+ genColumn += decodeSign(decodeInteger(reader));
1008
1006
  if (genColumn < lastCol) sorted = false;
1009
1007
  lastCol = genColumn;
1010
1008
  if (hasMoreVlq(reader, semi)) {
1011
- sourcesIndex = decodeInteger(reader, sourcesIndex);
1012
- sourceLine = decodeInteger(reader, sourceLine);
1013
- sourceColumn = decodeInteger(reader, sourceColumn);
1009
+ sourcesIndex += decodeSign(decodeInteger(reader));
1010
+ sourceLine += decodeSign(decodeInteger(reader));
1011
+ sourceColumn += decodeSign(decodeInteger(reader));
1014
1012
  if (hasMoreVlq(reader, semi)) {
1015
- namesIndex = decodeInteger(reader, namesIndex);
1013
+ namesIndex += decodeSign(decodeInteger(reader));
1016
1014
  seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
1017
1015
  } else {
1018
1016
  seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
@@ -1760,6 +1758,7 @@ class DecodedMap {
1760
1758
  _decoded;
1761
1759
  _decodedMemo;
1762
1760
  url;
1761
+ file;
1763
1762
  version;
1764
1763
  names = [];
1765
1764
  resolvedSources;
@@ -1771,6 +1770,7 @@ class DecodedMap {
1771
1770
  this._encoded = mappings || "";
1772
1771
  this._decodedMemo = memoizedState();
1773
1772
  this.url = from;
1773
+ this.file = from;
1774
1774
  this.resolvedSources = (sources || []).map((s) => resolve$1(from, "..", s || ""));
1775
1775
  }
1776
1776
  }
@@ -1,4 +1,4 @@
1
- import { T as TestError, P as ParsedStack } from './config.d.BgktgHfG.js';
1
+ import { T as TestError, P as ParsedStack } from './config.d.BpJq6tRA.js';
2
2
 
3
3
  interface RuntimeCoverageModuleLoader {
4
4
  import: (id: string) => Promise<{
@@ -73,6 +73,7 @@ declare class DecodedMap {
73
73
  _decoded: undefined | number[][][];
74
74
  _decodedMemo: Stats;
75
75
  url: string;
76
+ file: string;
76
77
  version: number;
77
78
  names: string[];
78
79
  resolvedSources: string[];