vitest-pool-assemblyscript 0.3.1 → 0.4.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 +2 -2
- package/assembly/compare.ts +127 -0
- package/assembly/expect.ts +116 -11
- package/dist/config/index-v3.d.mts +2 -2
- package/dist/config/index.d.mts +3 -3
- package/dist/{custom-provider-options-CF5C1kXb.d.mts → custom-provider-options-CVLz0nAp.d.mts} +2 -2
- package/dist/{custom-provider-options-CF5C1kXb.d.mts.map → custom-provider-options-CVLz0nAp.d.mts.map} +1 -1
- package/dist/index-internal.d.mts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/{pool-runner-init-CEwLyNI3.d.mts → pool-runner-init-8vx-5Pb4.d.mts} +2 -2
- package/dist/pool-runner-init-8vx-5Pb4.d.mts.map +1 -0
- package/dist/pool-thread/compile-worker-thread.d.mts +1 -1
- package/dist/pool-thread/test-worker-thread.d.mts +1 -1
- package/dist/pool-thread/v3-tinypool-thread.d.mts +1 -1
- package/dist/{types-8KKo9Hbf.d.mts → types-DasF0_PX.d.mts} +1 -2
- package/dist/types-DasF0_PX.d.mts.map +1 -0
- package/package.json +1 -1
- package/dist/pool-runner-init-CEwLyNI3.d.mts.map +0 -1
- package/dist/types-8KKo9Hbf.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -141,7 +141,7 @@ npx vitest run
|
|
|
141
141
|
- Suite and test definition using `describe()` and `test()` in AssemblyScript
|
|
142
142
|
- Inline test option configuration for common vitest options: `timeout`, `retry`, `skip`, `only`, `fails`
|
|
143
143
|
- Assertion matching API based on vitest/jest `expect()` API
|
|
144
|
-
- `.not`, `toBe`, `toBeCloseTo`, `toEqual` (with caveats*), `toStrictEqual`, `toHaveLength`, `toThrowError`, `toBeTruthy`, `toBeFalsy`, `toBeNull`, `toBeNullable`, `toBeNaN`
|
|
144
|
+
- `.not`, `toBe`, `toBeCloseTo`, `toEqual` (with caveats*), `toStrictEqual`, `toBeGreaterThan`, `toBeGreaterThanOrEqual`, `toBeLessThan`, `toBeLessThanOrEqual`, `toHaveLength`, `toThrowError`, `toBeTruthy`, `toBeFalsy`, `toBeNull`, `toBeNullable`, `toBeNaN`
|
|
145
145
|
- See [Matchers API](docs/matchers-api.md) for details and differences from JavaScript
|
|
146
146
|
- Highlighted diffs for assertion and runtime failures, which point to source code
|
|
147
147
|
- Source-mapped WASM error stack traces (accurate AssemblyScript source `function file:line:column`)
|
|
@@ -293,7 +293,7 @@ These are known limitations which are currently being worked on.
|
|
|
293
293
|
- Maybe: Per-file compilation setting override
|
|
294
294
|
|
|
295
295
|
**Epic: Expand expect matcher API**
|
|
296
|
-
- Planned: `toBeDefined`, `toBeUndefined`, `
|
|
296
|
+
- Planned: `toBeDefined`, `toBeUndefined`, `toContain`, `toContainEqual`
|
|
297
297
|
- Likely: `toBeOneOf`, `toBeTypeOf`, `toBeInstanceOf`, `toHaveProperty`, `toMatch`
|
|
298
298
|
|
|
299
299
|
**Epic: Spy and Mock**
|
package/assembly/compare.ts
CHANGED
|
@@ -219,6 +219,133 @@ export function equals<T, U>(actual: T, expected: U): bool {
|
|
|
219
219
|
);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
export enum InequalityOperation {
|
|
223
|
+
LessThan,
|
|
224
|
+
LessThanOrEqual,
|
|
225
|
+
GreaterThan,
|
|
226
|
+
GreaterThanOrEqual,
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Applies an inequality operation to two values of the same promoted type.
|
|
231
|
+
* Handles <, <=, >, >= for any type that supports these operators (numbers, strings).
|
|
232
|
+
*/
|
|
233
|
+
function applyInequalityOp<T>(a: T, b: T, op: InequalityOperation): bool {
|
|
234
|
+
if (op == InequalityOperation.LessThan) return a < b;
|
|
235
|
+
if (op == InequalityOperation.LessThanOrEqual) return a <= b;
|
|
236
|
+
if (op == InequalityOperation.GreaterThan) return a > b;
|
|
237
|
+
return a >= b; // GreaterThanOrEqual
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Generic inequality comparison. Promotes both values to a common type and applies
|
|
242
|
+
* the requested inequality operation.
|
|
243
|
+
*
|
|
244
|
+
* Strings are compared lexicographically. Booleans are treated as integers (true=1, false=0).
|
|
245
|
+
* Non-string references are not comparable and throw an error.
|
|
246
|
+
*
|
|
247
|
+
* Cross-sign integer comparisons are supported (more permissive than AS's own operators)
|
|
248
|
+
* via signed-negative early return + u64 promotion. Float/integer combinations where the
|
|
249
|
+
* float's mantissa cannot losslessly represent the integer type's range are rejected,
|
|
250
|
+
* matching AS compiler behavior. See docs/matcher-research.md for details.
|
|
251
|
+
*/
|
|
252
|
+
export function compareInequality<T, U>(actual: T, compareTo: U, expectedOperation: InequalityOperation): bool {
|
|
253
|
+
// --- Strings: lexicographic comparison ---
|
|
254
|
+
if (isString<T>() && isString<U>()) {
|
|
255
|
+
// Guard against null before casting, mirroring identical()'s pattern
|
|
256
|
+
const actualIsNull = isNullable<T>() && actual == null;
|
|
257
|
+
const compareToIsNull = isNullable<U>() && compareTo == null;
|
|
258
|
+
if (actualIsNull || compareToIsNull) {
|
|
259
|
+
throw new Error(
|
|
260
|
+
"Cannot compare null string with inequality operators: the result is undefined."
|
|
261
|
+
+ " Use toBeNull() to check for null values."
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
return applyInequalityOp(<string>actual, <string>compareTo, expectedOperation);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// --- Reject non-string references (objects, arrays, etc.) ---
|
|
268
|
+
if (isReference<T>() || isReference<U>()) {
|
|
269
|
+
throw new Error(
|
|
270
|
+
"Inequality comparison is not supported for " + nameof<T>() + " and " + nameof<U>()
|
|
271
|
+
+ ". Only numeric types and strings can be compared with inequality matchers."
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// --- Float/integer precision-loss rejection ---
|
|
276
|
+
// Reject combinations where the float's mantissa cannot losslessly represent
|
|
277
|
+
// the integer type's full range (sizeof(integer) >= sizeof(float)).
|
|
278
|
+
// This mirrors AS's own operator rejection (e.g. f32 > i32, f64 > i64).
|
|
279
|
+
if (isFloat<T>() && isInteger<U>()) {
|
|
280
|
+
if (sizeof<U>() >= sizeof<T>()) {
|
|
281
|
+
throw new Error(
|
|
282
|
+
"Cannot compare " + nameof<T>() + " with " + nameof<U>()
|
|
283
|
+
+ ": float precision is insufficient for the integer type's range."
|
|
284
|
+
+ " Cast both values to f64 before comparing, e.g. expect(f64(a)).toBeGreaterThan(f64(b))."
|
|
285
|
+
+ " Note: large integer values may lose precision when cast to f64, which could cause false positives."
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
} else if (isInteger<T>() && isFloat<U>()) {
|
|
289
|
+
if (sizeof<T>() >= sizeof<U>()) {
|
|
290
|
+
throw new Error(
|
|
291
|
+
"Cannot compare " + nameof<T>() + " with " + nameof<U>()
|
|
292
|
+
+ ": float precision is insufficient for the integer type's range."
|
|
293
|
+
+ " Cast both values to f64 before comparing, e.g. expect(f64(a)).toBeGreaterThan(f64(b))."
|
|
294
|
+
+ " Note: large integer values may lose precision when cast to f64, which could cause false positives."
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// --- Numeric comparisons ---
|
|
300
|
+
// Booleans flow through here naturally (isInteger<bool>() is true in AS).
|
|
301
|
+
|
|
302
|
+
if (isInteger<T>() && isInteger<U>()) {
|
|
303
|
+
// Both signed → promote to i64
|
|
304
|
+
if (isSigned<T>() && isSigned<U>()) {
|
|
305
|
+
return applyInequalityOp(i64(actual), i64(compareTo), expectedOperation);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Both unsigned → promote to u64
|
|
309
|
+
if (!isSigned<T>() && !isSigned<U>()) {
|
|
310
|
+
return applyInequalityOp(u64(actual), u64(compareTo), expectedOperation);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// Mixed sign — more permissive than AS, which rejects these at compile time.
|
|
314
|
+
// If the signed value is negative, the result is deterministic: signed < unsigned.
|
|
315
|
+
if (isSigned<T>() && !isSigned<U>()) {
|
|
316
|
+
if (i64(actual) < 0) {
|
|
317
|
+
// actual (signed negative) is always less than compareTo (unsigned)
|
|
318
|
+
return expectedOperation == InequalityOperation.LessThan
|
|
319
|
+
|| expectedOperation == InequalityOperation.LessThanOrEqual;
|
|
320
|
+
}
|
|
321
|
+
return applyInequalityOp(u64(actual), u64(compareTo), expectedOperation);
|
|
322
|
+
} else {
|
|
323
|
+
// !isSigned<T>() && isSigned<U>()
|
|
324
|
+
if (i64(compareTo) < 0) {
|
|
325
|
+
// compareTo (signed negative) is always less than actual (unsigned)
|
|
326
|
+
return expectedOperation == InequalityOperation.GreaterThan
|
|
327
|
+
|| expectedOperation == InequalityOperation.GreaterThanOrEqual;
|
|
328
|
+
}
|
|
329
|
+
return applyInequalityOp(u64(actual), u64(compareTo), expectedOperation);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// Both floats → promote to f64
|
|
334
|
+
if (isFloat<T>() && isFloat<U>()) {
|
|
335
|
+
return applyInequalityOp(f64(actual), f64(compareTo), expectedOperation);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// Supported float/integer combo (passed precision-loss check above) → promote to f64
|
|
339
|
+
if ( (isFloat<T>() && isInteger<U>()) || (isInteger<T>() && isFloat<U>()) ) {
|
|
340
|
+
return applyInequalityOp(f64(actual), f64(compareTo), expectedOperation);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Unsupported type combination (e.g. vectors)
|
|
344
|
+
throw new Error(
|
|
345
|
+
"Inequality comparison is not supported for " + nameof<T>() + " and " + nameof<U>() + "."
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
|
|
222
349
|
export function truthyOrFalsey<T>(actual: T, expected: bool): bool {
|
|
223
350
|
return actual ? expected == true : expected == false;
|
|
224
351
|
}
|
package/assembly/expect.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
closeTo,
|
|
3
|
+
compareInequality,
|
|
3
4
|
equals,
|
|
4
5
|
identical,
|
|
6
|
+
InequalityOperation,
|
|
5
7
|
isNull,
|
|
6
8
|
nan,
|
|
7
9
|
truthyOrFalsey
|
|
@@ -97,12 +99,12 @@ abstract class BaseExpectMatcher<T> {
|
|
|
97
99
|
* objects, arrays, etc).
|
|
98
100
|
*
|
|
99
101
|
* Cross-type numeric comparisons are allowed where AssemblyScript's own `==` operator
|
|
100
|
-
* permits them (e.g. `f64` vs `i32`).
|
|
101
|
-
*
|
|
102
|
-
*
|
|
102
|
+
* permits them (e.g. `f64` vs `i32`). `toBeCloseTo()` is safer for any comparison
|
|
103
|
+
* involving a float and allows all numeric types because it can still produce accurate
|
|
104
|
+
* results in precision-loss casting edge cases.
|
|
103
105
|
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
+
* @throws When comparing float/integer types where the float's mantissa cannot losslessly
|
|
107
|
+
* represent the integer type's range (e.g. `f32` vs `i32`, `f64` vs `i64`).
|
|
106
108
|
*
|
|
107
109
|
* @example
|
|
108
110
|
* expect(1 + 1).toBe(2);
|
|
@@ -132,7 +134,7 @@ abstract class BaseExpectMatcher<T> {
|
|
|
132
134
|
* Strings are compared by value equality as with `toBe`. Non-numeric, non-string types return false.
|
|
133
135
|
*
|
|
134
136
|
* @param precision - Specify the number of decimal places that must match for values to be
|
|
135
|
-
* considered close. Defaults to 2 digits, meaning effectively that values must be within 0.005 of
|
|
137
|
+
* considered close. Defaults to 2 digits, meaning effectively that values must be within 0.005 of
|
|
136
138
|
* each other.
|
|
137
139
|
*
|
|
138
140
|
* @example
|
|
@@ -142,7 +144,109 @@ abstract class BaseExpectMatcher<T> {
|
|
|
142
144
|
toBeCloseTo<U>(val: U, precision: i32 = 2): void {
|
|
143
145
|
this.assertComparison(closeTo(this.actual, val, precision), this.actual, val, "to be close to", true);
|
|
144
146
|
}
|
|
145
|
-
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Checks that a value is greater than the expected value. Supports numeric types
|
|
150
|
+
* (integers, floats, booleans) and strings (lexicographic comparison).
|
|
151
|
+
*
|
|
152
|
+
* Cross-type numeric comparisons are allowed where safe, including cross-sign integers
|
|
153
|
+
* (more permissive than AS's own `>` operator). Booleans are treated as numeric
|
|
154
|
+
* (true=1, false=0).
|
|
155
|
+
*
|
|
156
|
+
* @throws When comparing float/integer types where the float's mantissa cannot losslessly
|
|
157
|
+
* represent the integer type's range (e.g. `f32` vs `i32`, `f64` vs `i64`).
|
|
158
|
+
* @throws When comparing nullable strings where either value is null. Use `toBeNull()`
|
|
159
|
+
* to check for null values.
|
|
160
|
+
* @throws When comparing non-string reference types (objects, arrays, etc).
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* expect(10).toBeGreaterThan(5);
|
|
164
|
+
* expect(3.14).toBeGreaterThan(3);
|
|
165
|
+
* expect("banana").toBeGreaterThan("apple");
|
|
166
|
+
*/
|
|
167
|
+
toBeGreaterThan<U>(val: U): void {
|
|
168
|
+
this.assertComparison(
|
|
169
|
+
compareInequality(this.actual, val, InequalityOperation.GreaterThan),
|
|
170
|
+
this.actual, val, "to be greater than", true
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Checks that a value is greater than or equal to the expected value. Supports numeric
|
|
176
|
+
* types (integers, floats, booleans) and strings (lexicographic comparison).
|
|
177
|
+
*
|
|
178
|
+
* Cross-type numeric comparisons are allowed where safe, including cross-sign integers
|
|
179
|
+
* (more permissive than AS's own `>=` operator). Booleans are treated as numeric
|
|
180
|
+
* (true=1, false=0).
|
|
181
|
+
*
|
|
182
|
+
* @throws When comparing float/integer types where the float's mantissa cannot losslessly
|
|
183
|
+
* represent the integer type's range (e.g. `f32` vs `i32`, `f64` vs `i64`).
|
|
184
|
+
* @throws When comparing nullable strings where either value is null. Use `toBeNull()`
|
|
185
|
+
* to check for null values.
|
|
186
|
+
* @throws When comparing non-string reference types (objects, arrays, etc).
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* expect(10).toBeGreaterThanOrEqual(10);
|
|
190
|
+
* expect(3.14).toBeGreaterThanOrEqual(3);
|
|
191
|
+
*/
|
|
192
|
+
toBeGreaterThanOrEqual<U>(val: U): void {
|
|
193
|
+
this.assertComparison(
|
|
194
|
+
compareInequality(this.actual, val, InequalityOperation.GreaterThanOrEqual),
|
|
195
|
+
this.actual, val, "to be greater than or equal to", true
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Checks that a value is less than the expected value. Supports numeric types
|
|
201
|
+
* (integers, floats, booleans) and strings (lexicographic comparison).
|
|
202
|
+
*
|
|
203
|
+
* Cross-type numeric comparisons are allowed where safe, including cross-sign integers
|
|
204
|
+
* (more permissive than AS's own `<` operator). Booleans are treated as numeric
|
|
205
|
+
* (true=1, false=0).
|
|
206
|
+
*
|
|
207
|
+
* @throws When comparing float/integer types where the float's mantissa cannot losslessly
|
|
208
|
+
* represent the integer type's range (e.g. `f32` vs `i32`, `f64` vs `i64`).
|
|
209
|
+
* @throws When comparing nullable strings where either value is null. Use `toBeNull()`
|
|
210
|
+
* to check for null values.
|
|
211
|
+
* @throws When comparing non-string reference types (objects, arrays, etc).
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* expect(5).toBeLessThan(10);
|
|
215
|
+
* expect(3).toBeLessThan(3.14);
|
|
216
|
+
* expect("apple").toBeLessThan("banana");
|
|
217
|
+
*/
|
|
218
|
+
toBeLessThan<U>(val: U): void {
|
|
219
|
+
this.assertComparison(
|
|
220
|
+
compareInequality(this.actual, val, InequalityOperation.LessThan),
|
|
221
|
+
this.actual, val, "to be less than", true
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Checks that a value is less than or equal to the expected value. Supports numeric
|
|
227
|
+
* types (integers, floats, booleans) and strings (lexicographic comparison).
|
|
228
|
+
*
|
|
229
|
+
* Cross-type numeric comparisons are allowed where safe, including cross-sign integers
|
|
230
|
+
* (more permissive than AS's own `<=` operator). Booleans are treated as numeric
|
|
231
|
+
* (true=1, false=0).
|
|
232
|
+
*
|
|
233
|
+
* @throws When comparing float/integer types where the float's mantissa cannot losslessly
|
|
234
|
+
* represent the integer type's range (e.g. `f32` vs `i32`, `f64` vs `i64`).
|
|
235
|
+
* @throws When comparing nullable strings where either value is null. Use `toBeNull()`
|
|
236
|
+
* to check for null values.
|
|
237
|
+
* @throws When comparing non-string reference types (objects, arrays, etc).
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* expect(5).toBeLessThanOrEqual(5);
|
|
241
|
+
* expect(3).toBeLessThanOrEqual(3.14);
|
|
242
|
+
*/
|
|
243
|
+
toBeLessThanOrEqual<U>(val: U): void {
|
|
244
|
+
this.assertComparison(
|
|
245
|
+
compareInequality(this.actual, val, InequalityOperation.LessThanOrEqual),
|
|
246
|
+
this.actual, val, "to be less than or equal to", true
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
146
250
|
/**
|
|
147
251
|
* Checks that two values have the same value (deep equality). Currently supports
|
|
148
252
|
* checking equality of Arrays, Sets, Maps, and nulls. Values inside arrays are
|
|
@@ -151,13 +255,14 @@ abstract class BaseExpectMatcher<T> {
|
|
|
151
255
|
* `toBe()` rules.
|
|
152
256
|
*
|
|
153
257
|
* Like `toBe`, cross-type numeric comparisons follow AssemblyScript's own `==` operator
|
|
154
|
-
* restrictions.
|
|
155
|
-
*
|
|
156
|
-
* `f64` vs `i64`). `toBeCloseTo()` is safer for any comparison involving a float and
|
|
157
|
-
* accurately handles these edge cases.
|
|
258
|
+
* restrictions. `toBeCloseTo()` is safer for any comparison involving a float and
|
|
259
|
+
* accurately handles precision-loss edge cases.
|
|
158
260
|
*
|
|
159
261
|
* ⚠️ IMPORTANT: Does not yet support user-defined object deep equality checking.
|
|
160
262
|
*
|
|
263
|
+
* @throws When comparing float/integer types where the float's mantissa cannot losslessly
|
|
264
|
+
* represent the integer type's range (e.g. `f32` vs `i32`, `f64` vs `i64`).
|
|
265
|
+
*
|
|
161
266
|
* @example
|
|
162
267
|
* expect([1, 2, 3]).toEqual([1, 2, 3]);
|
|
163
268
|
* expect(["one", "two", "three"]).toEqual(["one", "two", "three"]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AssemblyScriptPoolOptions, WasmImportsFactory, WasmImportsFactoryInfo } from "../types-
|
|
2
|
-
import "../custom-provider-options-
|
|
1
|
+
import { AssemblyScriptPoolOptions, WasmImportsFactory, WasmImportsFactoryInfo } from "../types-DasF0_PX.mjs";
|
|
2
|
+
import "../custom-provider-options-CVLz0nAp.mjs";
|
|
3
3
|
import { ConfigEnv, UserWorkspaceConfig, ViteUserConfig } from "vitest/config";
|
|
4
4
|
|
|
5
5
|
//#region src/config/config-helpers-v3.d.ts
|
package/dist/config/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssemblyScriptPoolOptions, WasmImportsFactory, WasmImportsFactoryInfo } from "../types-
|
|
2
|
-
import "../custom-provider-options-
|
|
3
|
-
import { createAssemblyScriptPool } from "../pool-runner-init-
|
|
1
|
+
import { AssemblyScriptPoolOptions, WasmImportsFactory, WasmImportsFactoryInfo } from "../types-DasF0_PX.mjs";
|
|
2
|
+
import "../custom-provider-options-CVLz0nAp.mjs";
|
|
3
|
+
import { createAssemblyScriptPool } from "../pool-runner-init-8vx-5Pb4.mjs";
|
|
4
4
|
export { type AssemblyScriptPoolOptions, type WasmImportsFactory, type WasmImportsFactoryInfo, createAssemblyScriptPool };
|
package/dist/{custom-provider-options-CF5C1kXb.d.mts → custom-provider-options-CVLz0nAp.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HybridProviderOptions } from "./types-
|
|
1
|
+
import { HybridProviderOptions } from "./types-DasF0_PX.mjs";
|
|
2
2
|
import { CoverageV8Options } from "vitest/node";
|
|
3
3
|
|
|
4
4
|
//#region src/config/custom-provider-options.d.ts
|
|
@@ -23,4 +23,4 @@ declare module "vitest/node" {
|
|
|
23
23
|
customProviderModule: string;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
//# sourceMappingURL=custom-provider-options-
|
|
26
|
+
//# sourceMappingURL=custom-provider-options-CVLz0nAp.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-provider-options-
|
|
1
|
+
{"version":3,"file":"custom-provider-options-CVLz0nAp.d.mts","names":[],"sources":["../src/config/custom-provider-options.ts"],"mappings":";;;;;;AAE2C;;;;;;;;;;;;;YAiB/B,qBAAA,SAA8B,qBAAA,EAAuB,IAAA,CAAK,iBAAA;IAClE,QAAA;IAGD;IAAA,oBAAA;EAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssemblyScriptCompilerOptions, AssemblyScriptCompilerResult, AssemblyScriptPoolOptions } from "./types-
|
|
1
|
+
import { AssemblyScriptCompilerOptions, AssemblyScriptCompilerResult, AssemblyScriptPoolOptions } from "./types-DasF0_PX.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/compiler/index.d.ts
|
|
4
4
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { createAssemblyScriptPool } from "./pool-runner-init-
|
|
1
|
+
import "./types-DasF0_PX.mjs";
|
|
2
|
+
import { createAssemblyScriptPool } from "./pool-runner-init-8vx-5Pb4.mjs";
|
|
3
3
|
export { createAssemblyScriptPool };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AssemblyScriptPoolOptions } from "./types-
|
|
1
|
+
import { AssemblyScriptPoolOptions } from "./types-DasF0_PX.mjs";
|
|
2
2
|
import { PoolRunnerInitializer } from "vitest/node";
|
|
3
3
|
|
|
4
4
|
//#region src/pool/pool-runner-init.d.ts
|
|
5
5
|
declare function createAssemblyScriptPool(userPoolOptions?: AssemblyScriptPoolOptions): PoolRunnerInitializer;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { createAssemblyScriptPool };
|
|
8
|
-
//# sourceMappingURL=pool-runner-init-
|
|
8
|
+
//# sourceMappingURL=pool-runner-init-8vx-5Pb4.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool-runner-init-8vx-5Pb4.d.mts","names":[],"sources":["../src/pool/pool-runner-init.ts"],"mappings":";;;;iBAUgB,wBAAA,CAAyB,eAAA,GAAkB,yBAAA,GAA4B,qBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RunCompileAndDiscoverTask, ThreadSpec } from "../types-
|
|
1
|
+
import { RunCompileAndDiscoverTask, ThreadSpec } from "../types-DasF0_PX.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/pool-thread/compile-worker-thread.d.ts
|
|
4
4
|
declare function runCompileAndDisoverSpec(data: RunCompileAndDiscoverTask): Promise<ThreadSpec>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "tinyrainbow";
|
|
2
2
|
import { MessagePort } from "node:worker_threads";
|
|
3
3
|
import "birpc";
|
|
4
|
-
import "vitest/node";
|
|
5
4
|
import "@vitest/utils";
|
|
6
5
|
import { SerializedConfig } from "vitest";
|
|
7
6
|
import { File, Test } from "@vitest/runner/types";
|
|
@@ -225,4 +224,4 @@ interface ProcessPoolRunFileTask {
|
|
|
225
224
|
}
|
|
226
225
|
//#endregion
|
|
227
226
|
export { AssemblyScriptCompilerOptions, AssemblyScriptCompilerResult, AssemblyScriptPoolOptions, HybridProviderOptions, ProcessPoolRunFileTask, RunCompileAndDiscoverTask, RunTestsTask, ThreadSpec, WasmImportsFactory, WasmImportsFactoryInfo };
|
|
228
|
-
//# sourceMappingURL=types-
|
|
227
|
+
//# sourceMappingURL=types-DasF0_PX.d.mts.map
|
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UAMe,iBAAA;;EAEf,SAAA;;EAEA,IAAA;;;;;EAKA,sBAAA,EAAwB,cAAA;;EAExB,mBAAA;;EAEA,WAAA,EAAa,mBAAA;;EAEb,WAAA,EAAa,mBAAA;AAAA;;;;;;;UASE,eAAA;;EAEf,gBAAA;;;;;EAKA,0BAAA,EAA4B,MAAA,SAAe,MAAA,SAAe,iBAAA;EAE1D,yBAAA;AAAA;AAAA,UA2Ne,eAAA;EACf,QAAA;EACA,MAAA,EAAQ,UAAA;EACR,SAAA;EACA,SAAA,GAAY,eAAA;AAAA;AAAA,UASG,UAAA;EACf,IAAA,EAAM,IAAA;EACN,WAAA,GAAc,eAAA;AAAA;AAAA,UAGC,yBAAA;EACf,aAAA;EACA,QAAA;EACA,IAAA,EAAM,WAAA;EACN,IAAA,EAAM,IAAA;EACN,MAAA,EAAQ,gBAAA;EACR,kBAAA;AAAA;AAAA,UAGe,YAAA;EACf,aAAA;EACA,QAAA;EACA,IAAA,EAAM,WAAA;EACN,IAAA,EAAM,IAAA;EACN,WAAA,EAAa,eAAA;EACb,MAAA,EAAQ,gBAAA;EACR,kBAAA;EACA,YAAA,GAAe,IAAA;AAAA;AAAA,UAGA,sBAAA;EACf,aAAA;EACA,IAAA,EAAM,WAAA;EACN,IAAA,EAAM,IAAA;EACN,MAAA,EAAQ,gBAAA;EACR,kBAAA;EACA,YAAA,GAAe,IAAA;EACf,mBAAA,GAAsB,eAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-pool-assemblyscript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "AssemblyScript testing with Vitest - Simple, fast, familiar, AS-native, with full coverage output",
|
|
5
5
|
"author": "Matt Ritter <matthew.d.ritter@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pool-runner-init-CEwLyNI3.d.mts","names":[],"sources":["../src/pool/pool-runner-init.ts"],"mappings":";;;;iBAUgB,wBAAA,CAAyB,eAAA,GAAkB,yBAAA,GAA4B,qBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-8KKo9Hbf.d.mts","names":[],"sources":["../src/types/types.ts"],"mappings":";;;;;;;;;;AAqHA;;UA3DiB,yBAAA;EA6DK;EA3DpB,KAAA;;;;;;;;;;EAUA,WAAA;EAuDF;;;;;;;EA9CE,YAAA;EAEA,0BAAA;EACA,sBAAA;EAEA,sBAAA;EACA,kBAAA;EAEA,kBAAA;EAEA,kBAAA;AAAA;;;;UAMe,qBAAA;EACf,QAAA;EACA,oBAAA;EAsGA;AAGF;;;;;;;EA/FE,qBAAA;;;;;;EAOA,qBAAA;AAAA;AAAA,UAGe,sBAAA;EACf,MAAA,EAAQ,WAAA,CAAY,MAAA;EACpB,MAAA,EAAQ,WAAA,CAAY,MAAA;EACpB,KAAA;IACE,UAAA,GAAa,SAAA;EAAA;AAAA;AAAA,KAIL,kBAAA,IAAsB,UAAA,EAAY,sBAAA,KAA2B,WAAA,CAAY,OAAA;AAAA,UAqEpE,6BAAA;EACf,gBAAA;EACA,WAAA;EACA,sBAAA,GAAyB,sBAAA;EACzB,WAAA;EACA,UAAA;AAAA;AAAA,UAGe,4BAAA;EACf,MAAA,EAAQ,UAAA;EACR,SAAA;EACA,SAAA,GAAY,eAAA;EACZ,cAAA;EACA,aAAA;AAAA;AAAA,UAGe,sBAAA;;EAEf,qBAAA;EACA,yBAAA;EACA,sBAAA;EACA,sBAAA;AAAA;;;;;;AAiZF;UAxXiB,cAAA;;EAEf,QAAA;EACA,IAAA;EACA,MAAA;AAAA;;;;UAoEe,mBAAA;;EAEf,gBAAA;;EAEA,qBAAA;AAAA;;;;;;;UASe,mBAAA;EAyUjB;EAvUE,IAAA;;EAEA,QAAA,GAAW,cAAA;;EAEX,QAAA;;EAEA,WAAA;;;;;EAKA,mBAAA;AAAA;;;;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