vitest-pool-assemblyscript 0.9.1 → 0.10.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 (100) hide show
  1. package/assembly/compare.ts +11 -12
  2. package/assembly/describe.ts +4 -4
  3. package/assembly/expect.ts +44 -26
  4. package/assembly/test.ts +9 -9
  5. package/assembly/utils.ts +218 -62
  6. package/dist/{addon-interface-CYFXMbK7.mjs → addon-interface-BaUmn7uC.mjs} +12 -12
  7. package/dist/addon-interface-BaUmn7uC.mjs.map +1 -0
  8. package/dist/{ast-visitor-CWEOd3UH.mjs → ast-visitor-w1HMbuJR.mjs} +2 -2
  9. package/dist/{ast-visitor-CWEOd3UH.mjs.map → ast-visitor-w1HMbuJR.mjs.map} +1 -1
  10. package/dist/compile-runner-BGHM_85g.mjs +82 -0
  11. package/dist/compile-runner-BGHM_85g.mjs.map +1 -0
  12. package/dist/compiler/transforms/deep-equals.d.mts.map +1 -1
  13. package/dist/compiler/transforms/deep-equals.mjs +61 -22
  14. package/dist/compiler/transforms/deep-equals.mjs.map +1 -1
  15. package/dist/compiler/transforms/strip-inline.mjs +2 -2
  16. package/dist/{compiler-Dqs-qd3I.mjs → compiler-CXR5UJId.mjs} +55 -27
  17. package/dist/compiler-CXR5UJId.mjs.map +1 -0
  18. package/dist/config/index-v3.d.mts +1 -1
  19. package/dist/config/index-v3.d.mts.map +1 -1
  20. package/dist/config/index-v3.mjs.map +1 -1
  21. package/dist/config/index.d.mts +2 -2
  22. package/dist/config/index.mjs +5 -7
  23. package/dist/{constants-DbxJ3hzg.mjs → constants-Bq5KNxXJ.mjs} +4 -2
  24. package/dist/constants-Bq5KNxXJ.mjs.map +1 -0
  25. package/dist/{coverage-merge-CBXkpM1O.mjs → coverage-merge-0WqdC-dq.mjs} +1 -1
  26. package/dist/{coverage-merge-CBXkpM1O.mjs.map → coverage-merge-0WqdC-dq.mjs.map} +1 -1
  27. package/dist/coverage-provider/index.mjs +36 -36
  28. package/dist/coverage-provider/index.mjs.map +1 -1
  29. package/dist/{feature-check-Bje3ntpV.mjs → feature-check-BJpc4LoO.mjs} +4 -4
  30. package/dist/{feature-check-Bje3ntpV.mjs.map → feature-check-BJpc4LoO.mjs.map} +1 -1
  31. package/dist/index-internal.d.mts +3 -3
  32. package/dist/index-internal.d.mts.map +1 -1
  33. package/dist/index-internal.mjs +5 -4
  34. package/dist/index-v3.d.mts.map +1 -1
  35. package/dist/index-v3.mjs +19 -33
  36. package/dist/index-v3.mjs.map +1 -1
  37. package/dist/index.d.mts +1 -1
  38. package/dist/index.mjs +5 -7
  39. package/dist/{load-user-imports-Bx5ZlhSm.mjs → load-user-imports-Bcx9NOt9.mjs} +119 -232
  40. package/dist/load-user-imports-Bcx9NOt9.mjs.map +1 -0
  41. package/dist/pool-errors-Bn6YaguR.mjs +630 -0
  42. package/dist/pool-errors-Bn6YaguR.mjs.map +1 -0
  43. package/dist/{pool-runner-init-CNpRdA5u.d.mts → pool-runner-init-CCvnKt5o.d.mts} +2 -2
  44. package/dist/pool-runner-init-CCvnKt5o.d.mts.map +1 -0
  45. package/dist/{pool-runner-init-BqkwQ2tk.mjs → pool-runner-init-DjRCbiX-.mjs} +15 -30
  46. package/dist/pool-runner-init-DjRCbiX-.mjs.map +1 -0
  47. package/dist/pool-thread/compile-worker-thread.d.mts +1 -1
  48. package/dist/pool-thread/compile-worker-thread.d.mts.map +1 -1
  49. package/dist/pool-thread/compile-worker-thread.mjs +29 -19
  50. package/dist/pool-thread/compile-worker-thread.mjs.map +1 -1
  51. package/dist/pool-thread/test-worker-thread.d.mts +1 -1
  52. package/dist/pool-thread/test-worker-thread.d.mts.map +1 -1
  53. package/dist/pool-thread/test-worker-thread.mjs +25 -18
  54. package/dist/pool-thread/test-worker-thread.mjs.map +1 -1
  55. package/dist/pool-thread/v3-tinypool-thread.d.mts +1 -1
  56. package/dist/pool-thread/v3-tinypool-thread.d.mts.map +1 -1
  57. package/dist/pool-thread/v3-tinypool-thread.mjs +43 -33
  58. package/dist/pool-thread/v3-tinypool-thread.mjs.map +1 -1
  59. package/dist/test-runner-BeP8ClnE.mjs +147 -0
  60. package/dist/test-runner-BeP8ClnE.mjs.map +1 -0
  61. package/dist/{types-DHVk5iAx.d.mts → types-CoroKYxB.d.mts} +39 -16
  62. package/dist/types-CoroKYxB.d.mts.map +1 -0
  63. package/dist/vitest-file-tasks-vvZzigcF.mjs +473 -0
  64. package/dist/vitest-file-tasks-vvZzigcF.mjs.map +1 -0
  65. package/dist/wasm-memory-C8Nkl2Sz.mjs +134 -0
  66. package/dist/wasm-memory-C8Nkl2Sz.mjs.map +1 -0
  67. package/dist/{worker-rpc-channel-CZZIxtv5.mjs → worker-rpc-channel-CvCrc8aa.mjs} +1 -1
  68. package/dist/{worker-rpc-channel-CZZIxtv5.mjs.map → worker-rpc-channel-CvCrc8aa.mjs.map} +1 -1
  69. package/package.json +1 -1
  70. package/prebuilds/darwin-arm64/vitest-pool-assemblyscript.glibc.node +0 -0
  71. package/prebuilds/darwin-x64/vitest-pool-assemblyscript.glibc.node +0 -0
  72. package/prebuilds/linux-arm64/vitest-pool-assemblyscript.glibc.node +0 -0
  73. package/prebuilds/linux-x64/vitest-pool-assemblyscript.glibc.node +0 -0
  74. package/prebuilds/linux-x64/vitest-pool-assemblyscript.musl.node +0 -0
  75. package/prebuilds/win32-arm64/vitest-pool-assemblyscript.glibc.node +0 -0
  76. package/prebuilds/win32-x64/vitest-pool-assemblyscript.glibc.node +0 -0
  77. package/src/instrumentation/native/addon.cpp +71 -32
  78. package/dist/addon-interface-CYFXMbK7.mjs.map +0 -1
  79. package/dist/compile-runner-BNFHRGZO.mjs +0 -85
  80. package/dist/compile-runner-BNFHRGZO.mjs.map +0 -1
  81. package/dist/compiler-Dqs-qd3I.mjs.map +0 -1
  82. package/dist/constants-DbxJ3hzg.mjs.map +0 -1
  83. package/dist/debug-DtRAL4rM.mjs +0 -232
  84. package/dist/debug-DtRAL4rM.mjs.map +0 -1
  85. package/dist/load-user-imports-Bx5ZlhSm.mjs.map +0 -1
  86. package/dist/path-utils-t9OzjXYF.mjs +0 -24
  87. package/dist/path-utils-t9OzjXYF.mjs.map +0 -1
  88. package/dist/pool-runner-init-BqkwQ2tk.mjs.map +0 -1
  89. package/dist/pool-runner-init-CNpRdA5u.d.mts.map +0 -1
  90. package/dist/resolve-config-s9gSJSMc.mjs +0 -85
  91. package/dist/resolve-config-s9gSJSMc.mjs.map +0 -1
  92. package/dist/test-runner-BGqc9uCK.mjs +0 -138
  93. package/dist/test-runner-BGqc9uCK.mjs.map +0 -1
  94. package/dist/types-DHVk5iAx.d.mts.map +0 -1
  95. package/dist/vitest-file-tasks-D8sOClGX.mjs +0 -149
  96. package/dist/vitest-file-tasks-D8sOClGX.mjs.map +0 -1
  97. package/dist/vitest-tasks-BZ24sghI.mjs +0 -321
  98. package/dist/vitest-tasks-BZ24sghI.mjs.map +0 -1
  99. package/dist/wasm-names-BFtzQCH4.mjs +0 -124
  100. package/dist/wasm-names-BFtzQCH4.mjs.map +0 -1
@@ -99,9 +99,9 @@ export function equalsRtmNamesClear(): void {
99
99
  * being compared, enabling path context like ".shape" or ".members" in error messages.
100
100
  * Declared global to make it available in all source files without import.
101
101
  */
102
- // @ts-ignore: AS-specific global decorator
102
+ // @ts-ignore: top level decorators are supported in AssemblyScript
103
103
  @global
104
- function __vitest_assemblyscript_equals_path_push(segment: string): void {
104
+ function __vitest_assemblyscript_compare_equals_path_push(segment: string): void {
105
105
  equalsPathPush(segment);
106
106
  }
107
107
 
@@ -112,9 +112,9 @@ function __vitest_assemblyscript_equals_path_push(segment: string): void {
112
112
  * On non-Equal, the segment is left on the stack so the path accumulates
113
113
  * to the deepest mismatch point.
114
114
  */
115
- // @ts-ignore: AS-specific global decorator
115
+ // @ts-ignore: top level decorators are supported in AssemblyScript
116
116
  @global
117
- function __vitest_assemblyscript_equals_path_pop(): void {
117
+ function __vitest_assemblyscript_compare_equals_path_pop(): void {
118
118
  equalsPathPop();
119
119
  }
120
120
 
@@ -145,7 +145,7 @@ function equalsPathAtSuffix(): string {
145
145
  * Declared global so it is available in all source files without import —
146
146
  * including transform-injected deep equality methods in user classes.
147
147
  */
148
- // @ts-ignore: AS-specific global decorator
148
+ // @ts-ignore: top level decorators are supported in AssemblyScript
149
149
  @global
150
150
  export enum __vitest_assemblyscript_EqualityResult {
151
151
  Equal,
@@ -233,6 +233,7 @@ function mapEquals<T, U>(actual: T, expected: U): __vitest_assemblyscript_Equali
233
233
  // Key types must match exactly — cross-type key comparison is not safe because
234
234
  // .has() and .get() depend on the key's hash and equality semantics, which differ
235
235
  // across types (e.g. string vs i32 keys have incompatible hash/lookup behavior).
236
+ // @ts-ignore
236
237
  if (nameof<indexof<T>>() != nameof<indexof<U>>()) {
237
238
  throw new Error("Map key types must match for deep equality comparison: "
238
239
  + nameof<T>() + " and " + nameof<U>()
@@ -248,6 +249,7 @@ function mapEquals<T, U>(actual: T, expected: U): __vitest_assemblyscript_Equali
248
249
  // actual's native value type. This lets us iterate expected's keys and look them
249
250
  // up in actual, while equals() handles cross-type value comparison naturally
250
251
  // (e.g. valueof<T>=i32 vs valueof<U>=f64).
252
+ // @ts-ignore
251
253
  const castActual = changetype<Map<indexof<U>, valueof<T>>>(actual);
252
254
 
253
255
  // instanceof needed after changetype for the compiler to resolve Map methods
@@ -616,13 +618,13 @@ export function equals<T, U>(actual: T, expected: U): __vitest_assemblyscript_Eq
616
618
  }
617
619
  }
618
620
 
619
- // @ts-ignore
620
621
  // User-defined reference types: delegate to compiler transform-injected deep equality
621
622
  // method. Uses hard-coded method name because using a variable like `actual[DEEP_EQ_FUNC]`
622
623
  // requires the class to define an index signature.
623
624
  // Cast to NonNullable<T> because AS doesn't narrow nullability from the changetype-based
624
625
  // null checks above — it requires explicit type narrowing to call methods on nullable types.
625
626
  // Safe because both-null and one-null cases return early above.
627
+ // @ts-ignore
626
628
  if (isDefined(actual.__vitest_assemblyscript_deep_equals)) {
627
629
  const nonNullActual = <NonNullable<T>>actual;
628
630
  // @ts-ignore
@@ -639,15 +641,12 @@ export function equals<T, U>(actual: T, expected: U): __vitest_assemblyscript_Eq
639
641
  * Global bridge for the deep-equals compiler transform.
640
642
  *
641
643
  * Injected deep equality methods in user classes call this function for per-field
642
- * comparisons. Declared global to make it available in all source files without import,
643
- * solving the afterParse import resolution limitation (injected import statements
644
- * are not processed by the AS compiler).
644
+ * comparisons. Declared global to make it available in all user source files without import.
645
+ * (solves the `afterParse` import resolution limitation where injected import statements
646
+ * are not processed by the AS compiler)
645
647
  *
646
648
  * Returns __vitest_assemblyscript_EqualityResult so injected methods can propagate type mismatch information
647
649
  * from nested comparisons back to the top-level matcher.
648
- *
649
- * Loaded into the compilation transitively: user test imports
650
- * vitest-pool-assemblyscript/assembly → index.ts → compare.ts.
651
650
  */
652
651
  // @ts-ignore
653
652
  @global
@@ -28,7 +28,7 @@ declare function __end_register_suite(name: string): void;
28
28
  export function describe<T = TestCallback, U = TestOptions>(
29
29
  name: string,
30
30
  optionsOrFn: T,
31
- // @ts-ignore
31
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
32
32
  fnOrOptions: U = DEFAULT_TEST_OPTIONS // defaults all undefined here, merged with config in JS
33
33
  ): void {
34
34
  let fn: TestCallback;
@@ -62,7 +62,7 @@ function describeWithMergedOption<T = TestCallback, U = TestOptions>(
62
62
  name: string,
63
63
  optionToMerge: TestOptions,
64
64
  optionsOrFn: T,
65
- // @ts-ignore
65
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
66
66
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
67
67
  ): void {
68
68
  let fn: TestCallback;
@@ -87,7 +87,7 @@ export namespace describe {
87
87
  export function skip<T = TestCallback, U = TestOptions>(
88
88
  name: string,
89
89
  optionsOrFn: T,
90
- // @ts-ignore
90
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
91
91
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
92
92
  ): void {
93
93
  return describeWithMergedOption(name, TestOptions.skip(), optionsOrFn, fnOrOptions);
@@ -96,7 +96,7 @@ export namespace describe {
96
96
  export function only<T = TestCallback, U = TestOptions>(
97
97
  name: string,
98
98
  optionsOrFn: T,
99
- // @ts-ignore
99
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
100
100
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
101
101
  ): void {
102
102
  return describeWithMergedOption(name, TestOptions.only(), optionsOrFn, fnOrOptions);
@@ -11,7 +11,12 @@ import {
11
11
  InequalityOperation,
12
12
  truthyOrFalsey,
13
13
  } from './compare';
14
- import { isNull, nan, stringifyValue } from './utils';
14
+ import {
15
+ isNull,
16
+ nan,
17
+ stringifyValue,
18
+ STRINGIFY_SHORT_FORM_BUDGET
19
+ } from './utils';
15
20
 
16
21
  // @external functions are imported to the WASM execution environment from pool code
17
22
 
@@ -23,10 +28,11 @@ declare function __assertion_pass(): void;
23
28
  @external("__as_pool_env__", "__assertion_fail")
24
29
  declare function __assertion_fail<T>(
25
30
  msg: string,
26
- typeName: string,
31
+ actualTypeName: string,
32
+ expectedTypeName: string,
27
33
  valuesProvided: bool,
28
- actual?: T,
29
- expected?: T
34
+ actual?: string,
35
+ expected?: string
30
36
  ): void;
31
37
 
32
38
  // @ts-ignore: top level decorators are supported in AssemblyScript
@@ -306,6 +312,7 @@ abstract class BaseExpectMatcher<T> {
306
312
  equalsRtmNamesClear();
307
313
  const result = equals(this.actual, val);
308
314
  const path = equalsPathString();
315
+ // @ts-ignore: global
309
316
  const isRtm = result == __vitest_assemblyscript_EqualityResult.RuntimeTypeMismatch;
310
317
 
311
318
  let suffix = "";
@@ -316,6 +323,7 @@ abstract class BaseExpectMatcher<T> {
316
323
  suffix = " (differs at " + path + ")";
317
324
  }
318
325
 
326
+ // @ts-ignore: global
319
327
  this.assertComparison(result == __vitest_assemblyscript_EqualityResult.Equal, this.actual, val, "to deeply equal", true, true, suffix, isRtm);
320
328
  }
321
329
 
@@ -340,6 +348,7 @@ abstract class BaseExpectMatcher<T> {
340
348
  equalsRtmNamesClear();
341
349
  const result = equals(this.actual, val);
342
350
  const path = equalsPathString();
351
+ // @ts-ignore: global
343
352
  const isRtm = result == __vitest_assemblyscript_EqualityResult.RuntimeTypeMismatch;
344
353
 
345
354
  let suffix = "";
@@ -350,6 +359,7 @@ abstract class BaseExpectMatcher<T> {
350
359
  suffix = " (differs at " + path + ")";
351
360
  }
352
361
 
362
+ // @ts-ignore: global
353
363
  this.assertComparison(result == __vitest_assemblyscript_EqualityResult.Equal, this.actual, val, "to strictly equal", true, true, suffix, isRtm);
354
364
  }
355
365
 
@@ -459,10 +469,10 @@ abstract class BaseExpectMatcher<T> {
459
469
  const nonNullActual = <NonNullable<T>>this.actual;
460
470
 
461
471
  if (isFloat<U>()) {
462
- // @ts-ignore: .length is i32; use closeTo for float comparison
472
+ // @ts-ignore: TS doesn't know that nonNullActual is still array-like
463
473
  this.assertComparison<i32, U>(closeTo<i32, U>(nonNullActual.length, length), nonNullActual.length, length, "to have length", true);
464
474
  } else {
465
- // @ts-ignore: .length is i32; compare as integers
475
+ // @ts-ignore: TS doesn't know that nonNullActual is still array-like
466
476
  this.assertComparison<i32, U>(identical<i32, U>(nonNullActual.length, length), nonNullActual.length, length, "to have length", true);
467
477
  }
468
478
  } else {
@@ -486,31 +496,39 @@ abstract class BaseExpectMatcher<T> {
486
496
  __assertion_pass();
487
497
  } else {
488
498
  const notStr = this.isInverted ? "not " : "";
489
- // For runtime type mismatches, show the top-level type name only — the mismatched
490
- // types in the suffix are the useful information, not field contents of differently-typed
491
- // objects. Uses __vitest_assemblyscript_typename (virtual dispatch gives runtime name)
492
- // with nameof fallback for types without injection (containers, primitives).
493
- // For value mismatches, full stringification shows what values differ.
494
- let actualStr: string;
495
- let expectedStr: string;
496
- if (isRtm) {
499
+
500
+ // Type strings use __vitest_assemblyscript_typename (virtual dispatch gives runtime name)
501
+ // with `nameof` fallback for types without injection (containers, primitives)
502
+ // @ts-ignore
503
+ const actualType: string = isDefined(actual.__vitest_assemblyscript_typename)
497
504
  // @ts-ignore
498
- actualStr = isDefined(actual.__vitest_assemblyscript_typename)
499
- // @ts-ignore
500
- ? (<NonNullable<U>>actual).__vitest_assemblyscript_typename()
501
- : nameof<U>();
505
+ ? (<NonNullable<U>>actual).__vitest_assemblyscript_typename()
506
+ : nameof<U>();
507
+ // @ts-ignore
508
+ const expectedType: string = isDefined(expected.__vitest_assemblyscript_typename)
502
509
  // @ts-ignore
503
- expectedStr = isDefined(expected.__vitest_assemblyscript_typename)
504
- // @ts-ignore
505
- ? (<NonNullable<V>>expected).__vitest_assemblyscript_typename()
506
- : nameof<V>();
510
+ ? (<NonNullable<V>>expected).__vitest_assemblyscript_typename()
511
+ : nameof<V>();
512
+
513
+ let actualShort: string = "";
514
+ let expectedShort: string = "";
515
+ let actualDiff: string = "";
516
+ let expectedDiff: string = "";
517
+
518
+ if (isRtm) {
519
+ // For runtime type mismatches, show the top-level type name only
520
+ actualShort = actualDiff = actualType;
521
+ expectedShort = expectedDiff = expectedType;
507
522
  } else {
508
- actualStr = stringifyValue(actual);
509
- expectedStr = stringifyValue(expected);
523
+ // For value mismatches, stringification shows what values differ
524
+ actualShort = stringifyValue(actual, false, 0, STRINGIFY_SHORT_FORM_BUDGET);
525
+ expectedShort = stringifyValue(expected, false, 0, STRINGIFY_SHORT_FORM_BUDGET);
526
+ actualDiff = stringifyValue(actual, true);
527
+ expectedDiff = stringifyValue(expected, true);
510
528
  }
511
- const msg = `expected ${actualStr} ${notStr}${methodStr}${printExpected ? ` ${expectedStr}` : ""}${suffix}`;
529
+ const msg = `expected ${actualShort} ${notStr}${methodStr}${printExpected ? ` ${expectedShort}` : ""}${suffix}`;
512
530
 
513
- __assertion_fail<string>(msg, nameof<U>() + " " + nameof<V>(), provideDiff, actualStr, expectedStr);
531
+ __assertion_fail<string>(msg, actualType, expectedType, provideDiff, actualDiff, expectedDiff);
514
532
 
515
533
  // Abort on failure - terminates WASM execution - must be called from WASM.
516
534
  // Imported abort handler will handle this and mark the test as failed.
package/assembly/test.ts CHANGED
@@ -27,7 +27,7 @@ export type TestCallback = () => void;
27
27
  export function test<T = TestCallback, U = TestOptions>(
28
28
  name: string,
29
29
  optionsOrFn: T,
30
- // @ts-ignore
30
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
31
31
  fnOrOptions: U = DEFAULT_TEST_OPTIONS // defaults all undefined here, merged with config & suite in JS
32
32
  ): void {
33
33
  let fn: TestCallback;
@@ -58,7 +58,7 @@ function testWithMergedOption<T = TestCallback, U = TestOptions>(
58
58
  name: string,
59
59
  optionToMerge: TestOptions,
60
60
  optionsOrFn: T,
61
- // @ts-ignore
61
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
62
62
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
63
63
  ): void {
64
64
  let fn: TestCallback;
@@ -83,7 +83,7 @@ export namespace test {
83
83
  export function skip<T = TestCallback, U = TestOptions>(
84
84
  name: string,
85
85
  optionsOrFn: T,
86
- // @ts-ignore
86
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
87
87
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
88
88
  ): void {
89
89
  return testWithMergedOption(name, TestOptions.skip(), optionsOrFn, fnOrOptions);
@@ -92,7 +92,7 @@ export namespace test {
92
92
  export function only<T = TestCallback, U = TestOptions>(
93
93
  name: string,
94
94
  optionsOrFn: T,
95
- // @ts-ignore
95
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
96
96
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
97
97
  ): void {
98
98
  return testWithMergedOption(name, TestOptions.only(), optionsOrFn, fnOrOptions);
@@ -101,7 +101,7 @@ export namespace test {
101
101
  export function fails<T = TestCallback, U = TestOptions>(
102
102
  name: string,
103
103
  optionsOrFn: T,
104
- // @ts-ignore
104
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
105
105
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
106
106
  ): void {
107
107
  return testWithMergedOption(name, TestOptions.fails(), optionsOrFn, fnOrOptions);
@@ -111,7 +111,7 @@ export namespace test {
111
111
  export function it<T = TestCallback, U = TestOptions>(
112
112
  name: string,
113
113
  optionsOrFn: T,
114
- // @ts-ignore
114
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
115
115
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
116
116
  ): void {
117
117
  return test(name, optionsOrFn, fnOrOptions);
@@ -121,7 +121,7 @@ export namespace it {
121
121
  export function skip<T = TestCallback, U = TestOptions>(
122
122
  name: string,
123
123
  optionsOrFn: T,
124
- // @ts-ignore
124
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
125
125
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
126
126
  ): void {
127
127
  return testWithMergedOption(name, TestOptions.skip(), optionsOrFn, fnOrOptions);
@@ -130,7 +130,7 @@ export namespace it {
130
130
  export function only<T = TestCallback, U = TestOptions>(
131
131
  name: string,
132
132
  optionsOrFn: T,
133
- // @ts-ignore
133
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
134
134
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
135
135
  ): void {
136
136
  return testWithMergedOption(name, TestOptions.only(), optionsOrFn, fnOrOptions);
@@ -139,7 +139,7 @@ export namespace it {
139
139
  export function fails<T = TestCallback, U = TestOptions>(
140
140
  name: string,
141
141
  optionsOrFn: T,
142
- // @ts-ignore
142
+ // @ts-ignore: TS2322 ('U' could be instantiated with an arbitrary type) doesn't apply to AS
143
143
  fnOrOptions: U = DEFAULT_TEST_OPTIONS
144
144
  ): void {
145
145
  return testWithMergedOption(name, TestOptions.fails(), optionsOrFn, fnOrOptions);