@ricsam/quickjs-test-environment 0.2.0 → 0.2.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.
- package/dist/cjs/describe.cjs +180 -0
- package/dist/cjs/describe.cjs.map +10 -0
- package/dist/cjs/expect.cjs +622 -0
- package/dist/cjs/expect.cjs.map +10 -0
- package/dist/cjs/handle.cjs +79 -0
- package/dist/cjs/handle.cjs.map +10 -0
- package/dist/cjs/hooks.cjs +83 -0
- package/dist/cjs/hooks.cjs.map +10 -0
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/runner.cjs +346 -0
- package/dist/cjs/runner.cjs.map +10 -0
- package/dist/cjs/setup.cjs +70 -0
- package/dist/cjs/setup.cjs.map +10 -0
- package/dist/cjs/types.cjs +26 -0
- package/dist/cjs/types.cjs.map +9 -0
- package/dist/mjs/describe.mjs +149 -0
- package/dist/mjs/describe.mjs.map +10 -0
- package/dist/mjs/expect.mjs +591 -0
- package/dist/mjs/expect.mjs.map +10 -0
- package/dist/mjs/handle.mjs +48 -0
- package/dist/mjs/handle.mjs.map +10 -0
- package/dist/mjs/hooks.mjs +52 -0
- package/dist/mjs/hooks.mjs.map +10 -0
- package/dist/mjs/package.json +1 -1
- package/dist/mjs/runner.mjs +315 -0
- package/dist/mjs/runner.mjs.map +10 -0
- package/dist/mjs/setup.mjs +39 -0
- package/dist/mjs/setup.mjs.map +10 -0
- package/dist/mjs/types.mjs +3 -0
- package/dist/mjs/types.mjs.map +9 -0
- package/dist/types/globals/describe.d.ts +5 -0
- package/dist/types/globals/expect.d.ts +3 -0
- package/dist/types/globals/hooks.d.ts +3 -0
- package/dist/types/runner.d.ts +5 -0
- package/dist/types/types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
// @bun @bun-cjs
|
|
2
|
+
(function(exports, require, module, __filename, __dirname) {var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
7
|
+
var __toCommonJS = (from) => {
|
|
8
|
+
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
if (entry)
|
|
10
|
+
return entry;
|
|
11
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
13
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
}));
|
|
17
|
+
__moduleCache.set(from, entry);
|
|
18
|
+
return entry;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, {
|
|
23
|
+
get: all[name],
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
set: (newValue) => all[name] = () => newValue
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// packages/test-environment/src/globals/expect.ts
|
|
31
|
+
var exports_expect = {};
|
|
32
|
+
__export(exports_expect, {
|
|
33
|
+
setupExpect: () => setupExpect
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(exports_expect);
|
|
36
|
+
function setupExpect(context, state) {
|
|
37
|
+
const handles = [];
|
|
38
|
+
const expectCode = `
|
|
39
|
+
(function() {
|
|
40
|
+
// Deep equality check
|
|
41
|
+
function deepEqual(a, b) {
|
|
42
|
+
if (a === b) return true;
|
|
43
|
+
if (a === null || b === null) return false;
|
|
44
|
+
if (typeof a !== typeof b) return false;
|
|
45
|
+
|
|
46
|
+
if (typeof a === 'object') {
|
|
47
|
+
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
48
|
+
|
|
49
|
+
if (Array.isArray(a)) {
|
|
50
|
+
if (a.length !== b.length) return false;
|
|
51
|
+
for (let i = 0; i < a.length; i++) {
|
|
52
|
+
if (!deepEqual(a[i], b[i])) return false;
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const keysA = Object.keys(a);
|
|
58
|
+
const keysB = Object.keys(b);
|
|
59
|
+
if (keysA.length !== keysB.length) return false;
|
|
60
|
+
|
|
61
|
+
for (const key of keysA) {
|
|
62
|
+
if (!Object.prototype.hasOwnProperty.call(b, key)) return false;
|
|
63
|
+
if (!deepEqual(a[key], b[key])) return false;
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Strict equality (checks undefined values and array holes)
|
|
72
|
+
function strictEqual(a, b) {
|
|
73
|
+
if (!deepEqual(a, b)) return false;
|
|
74
|
+
|
|
75
|
+
if (typeof a === 'object' && a !== null) {
|
|
76
|
+
if (Array.isArray(a)) {
|
|
77
|
+
// Check for sparse arrays
|
|
78
|
+
for (let i = 0; i < a.length; i++) {
|
|
79
|
+
if ((i in a) !== (i in b)) return false;
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
// Check for undefined values
|
|
83
|
+
const keysA = Object.keys(a);
|
|
84
|
+
for (const key of keysA) {
|
|
85
|
+
if (a[key] === undefined && !(key in b)) return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Format value for error messages
|
|
94
|
+
function format(value) {
|
|
95
|
+
if (value === undefined) return 'undefined';
|
|
96
|
+
if (value === null) return 'null';
|
|
97
|
+
if (typeof value === 'string') return JSON.stringify(value);
|
|
98
|
+
if (typeof value === 'function') return '[Function]';
|
|
99
|
+
if (typeof value === 'symbol') return value.toString();
|
|
100
|
+
try {
|
|
101
|
+
return JSON.stringify(value);
|
|
102
|
+
} catch {
|
|
103
|
+
return String(value);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Create assertion error
|
|
108
|
+
function AssertionError(message, matcherName, expected, actual) {
|
|
109
|
+
const error = new Error(message);
|
|
110
|
+
error.name = 'AssertionError';
|
|
111
|
+
error.matcherName = matcherName;
|
|
112
|
+
error.expected = expected;
|
|
113
|
+
error.actual = actual;
|
|
114
|
+
return error;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Create matchers object
|
|
118
|
+
function createMatchers(actual, isNot) {
|
|
119
|
+
const matchers = {
|
|
120
|
+
// Strict equality (===)
|
|
121
|
+
toBe(expected) {
|
|
122
|
+
const pass = actual === expected;
|
|
123
|
+
if (isNot ? pass : !pass) {
|
|
124
|
+
throw AssertionError(
|
|
125
|
+
isNot
|
|
126
|
+
? \`Expected \${format(actual)} not to be \${format(expected)}\`
|
|
127
|
+
: \`Expected \${format(actual)} to be \${format(expected)}\`,
|
|
128
|
+
'toBe',
|
|
129
|
+
expected,
|
|
130
|
+
actual
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
// Deep equality
|
|
136
|
+
toEqual(expected) {
|
|
137
|
+
const pass = deepEqual(actual, expected);
|
|
138
|
+
if (isNot ? pass : !pass) {
|
|
139
|
+
throw AssertionError(
|
|
140
|
+
isNot
|
|
141
|
+
? \`Expected \${format(actual)} not to equal \${format(expected)}\`
|
|
142
|
+
: \`Expected \${format(actual)} to equal \${format(expected)}\`,
|
|
143
|
+
'toEqual',
|
|
144
|
+
expected,
|
|
145
|
+
actual
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
// Strict deep equality
|
|
151
|
+
toStrictEqual(expected) {
|
|
152
|
+
const pass = strictEqual(actual, expected);
|
|
153
|
+
if (isNot ? pass : !pass) {
|
|
154
|
+
throw AssertionError(
|
|
155
|
+
isNot
|
|
156
|
+
? \`Expected \${format(actual)} not to strictly equal \${format(expected)}\`
|
|
157
|
+
: \`Expected \${format(actual)} to strictly equal \${format(expected)}\`,
|
|
158
|
+
'toStrictEqual',
|
|
159
|
+
expected,
|
|
160
|
+
actual
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
// Truthy/Falsy
|
|
166
|
+
toBeTruthy() {
|
|
167
|
+
const pass = !!actual;
|
|
168
|
+
if (isNot ? pass : !pass) {
|
|
169
|
+
throw AssertionError(
|
|
170
|
+
isNot
|
|
171
|
+
? \`Expected \${format(actual)} not to be truthy\`
|
|
172
|
+
: \`Expected \${format(actual)} to be truthy\`,
|
|
173
|
+
'toBeTruthy',
|
|
174
|
+
'truthy value',
|
|
175
|
+
actual
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
toBeFalsy() {
|
|
181
|
+
const pass = !actual;
|
|
182
|
+
if (isNot ? pass : !pass) {
|
|
183
|
+
throw AssertionError(
|
|
184
|
+
isNot
|
|
185
|
+
? \`Expected \${format(actual)} not to be falsy\`
|
|
186
|
+
: \`Expected \${format(actual)} to be falsy\`,
|
|
187
|
+
'toBeFalsy',
|
|
188
|
+
'falsy value',
|
|
189
|
+
actual
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
// Null/Undefined/Defined
|
|
195
|
+
toBeNull() {
|
|
196
|
+
const pass = actual === null;
|
|
197
|
+
if (isNot ? pass : !pass) {
|
|
198
|
+
throw AssertionError(
|
|
199
|
+
isNot
|
|
200
|
+
? \`Expected \${format(actual)} not to be null\`
|
|
201
|
+
: \`Expected \${format(actual)} to be null\`,
|
|
202
|
+
'toBeNull',
|
|
203
|
+
null,
|
|
204
|
+
actual
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
toBeUndefined() {
|
|
210
|
+
const pass = actual === undefined;
|
|
211
|
+
if (isNot ? pass : !pass) {
|
|
212
|
+
throw AssertionError(
|
|
213
|
+
isNot
|
|
214
|
+
? \`Expected \${format(actual)} not to be undefined\`
|
|
215
|
+
: \`Expected \${format(actual)} to be undefined\`,
|
|
216
|
+
'toBeUndefined',
|
|
217
|
+
undefined,
|
|
218
|
+
actual
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
toBeDefined() {
|
|
224
|
+
const pass = actual !== undefined;
|
|
225
|
+
if (isNot ? pass : !pass) {
|
|
226
|
+
throw AssertionError(
|
|
227
|
+
isNot
|
|
228
|
+
? \`Expected \${format(actual)} to be undefined\`
|
|
229
|
+
: \`Expected \${format(actual)} to be defined\`,
|
|
230
|
+
'toBeDefined',
|
|
231
|
+
'defined value',
|
|
232
|
+
actual
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
toBeNaN() {
|
|
238
|
+
const pass = Number.isNaN(actual);
|
|
239
|
+
if (isNot ? pass : !pass) {
|
|
240
|
+
throw AssertionError(
|
|
241
|
+
isNot
|
|
242
|
+
? \`Expected \${format(actual)} not to be NaN\`
|
|
243
|
+
: \`Expected \${format(actual)} to be NaN\`,
|
|
244
|
+
'toBeNaN',
|
|
245
|
+
NaN,
|
|
246
|
+
actual
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
|
|
251
|
+
// Numeric comparisons
|
|
252
|
+
toBeGreaterThan(expected) {
|
|
253
|
+
const pass = actual > expected;
|
|
254
|
+
if (isNot ? pass : !pass) {
|
|
255
|
+
throw AssertionError(
|
|
256
|
+
isNot
|
|
257
|
+
? \`Expected \${format(actual)} not to be greater than \${format(expected)}\`
|
|
258
|
+
: \`Expected \${format(actual)} to be greater than \${format(expected)}\`,
|
|
259
|
+
'toBeGreaterThan',
|
|
260
|
+
expected,
|
|
261
|
+
actual
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
toBeGreaterThanOrEqual(expected) {
|
|
267
|
+
const pass = actual >= expected;
|
|
268
|
+
if (isNot ? pass : !pass) {
|
|
269
|
+
throw AssertionError(
|
|
270
|
+
isNot
|
|
271
|
+
? \`Expected \${format(actual)} not to be greater than or equal to \${format(expected)}\`
|
|
272
|
+
: \`Expected \${format(actual)} to be greater than or equal to \${format(expected)}\`,
|
|
273
|
+
'toBeGreaterThanOrEqual',
|
|
274
|
+
expected,
|
|
275
|
+
actual
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
toBeLessThan(expected) {
|
|
281
|
+
const pass = actual < expected;
|
|
282
|
+
if (isNot ? pass : !pass) {
|
|
283
|
+
throw AssertionError(
|
|
284
|
+
isNot
|
|
285
|
+
? \`Expected \${format(actual)} not to be less than \${format(expected)}\`
|
|
286
|
+
: \`Expected \${format(actual)} to be less than \${format(expected)}\`,
|
|
287
|
+
'toBeLessThan',
|
|
288
|
+
expected,
|
|
289
|
+
actual
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
toBeLessThanOrEqual(expected) {
|
|
295
|
+
const pass = actual <= expected;
|
|
296
|
+
if (isNot ? pass : !pass) {
|
|
297
|
+
throw AssertionError(
|
|
298
|
+
isNot
|
|
299
|
+
? \`Expected \${format(actual)} not to be less than or equal to \${format(expected)}\`
|
|
300
|
+
: \`Expected \${format(actual)} to be less than or equal to \${format(expected)}\`,
|
|
301
|
+
'toBeLessThanOrEqual',
|
|
302
|
+
expected,
|
|
303
|
+
actual
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
|
|
308
|
+
// Contains
|
|
309
|
+
toContain(expected) {
|
|
310
|
+
let pass = false;
|
|
311
|
+
if (typeof actual === 'string') {
|
|
312
|
+
pass = actual.includes(expected);
|
|
313
|
+
} else if (Array.isArray(actual)) {
|
|
314
|
+
pass = actual.includes(expected);
|
|
315
|
+
}
|
|
316
|
+
if (isNot ? pass : !pass) {
|
|
317
|
+
throw AssertionError(
|
|
318
|
+
isNot
|
|
319
|
+
? \`Expected \${format(actual)} not to contain \${format(expected)}\`
|
|
320
|
+
: \`Expected \${format(actual)} to contain \${format(expected)}\`,
|
|
321
|
+
'toContain',
|
|
322
|
+
expected,
|
|
323
|
+
actual
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
// Length
|
|
329
|
+
toHaveLength(expected) {
|
|
330
|
+
const actualLength = actual?.length;
|
|
331
|
+
const pass = actualLength === expected;
|
|
332
|
+
if (isNot ? pass : !pass) {
|
|
333
|
+
throw AssertionError(
|
|
334
|
+
isNot
|
|
335
|
+
? \`Expected length not to be \${expected}, but got \${actualLength}\`
|
|
336
|
+
: \`Expected length to be \${expected}, but got \${actualLength}\`,
|
|
337
|
+
'toHaveLength',
|
|
338
|
+
expected,
|
|
339
|
+
actualLength
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
// Property
|
|
345
|
+
toHaveProperty(key, value) {
|
|
346
|
+
const hasKey = key in Object(actual);
|
|
347
|
+
let pass = hasKey;
|
|
348
|
+
if (hasKey && arguments.length > 1) {
|
|
349
|
+
pass = deepEqual(actual[key], value);
|
|
350
|
+
}
|
|
351
|
+
if (isNot ? pass : !pass) {
|
|
352
|
+
const message = arguments.length > 1
|
|
353
|
+
? (isNot
|
|
354
|
+
? \`Expected \${format(actual)} not to have property "\${key}" with value \${format(value)}\`
|
|
355
|
+
: \`Expected \${format(actual)} to have property "\${key}" with value \${format(value)}\`)
|
|
356
|
+
: (isNot
|
|
357
|
+
? \`Expected \${format(actual)} not to have property "\${key}"\`
|
|
358
|
+
: \`Expected \${format(actual)} to have property "\${key}"\`);
|
|
359
|
+
throw AssertionError(message, 'toHaveProperty', value, actual?.[key]);
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
|
|
363
|
+
// Throws
|
|
364
|
+
toThrow(expected) {
|
|
365
|
+
if (typeof actual !== 'function') {
|
|
366
|
+
throw AssertionError('Expected a function', 'toThrow', 'function', typeof actual);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
let threw = false;
|
|
370
|
+
let error;
|
|
371
|
+
try {
|
|
372
|
+
actual();
|
|
373
|
+
} catch (e) {
|
|
374
|
+
threw = true;
|
|
375
|
+
error = e;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
let pass = threw;
|
|
379
|
+
if (threw && expected !== undefined) {
|
|
380
|
+
if (typeof expected === 'string') {
|
|
381
|
+
pass = error?.message?.includes(expected);
|
|
382
|
+
} else if (expected instanceof RegExp) {
|
|
383
|
+
pass = expected.test(error?.message);
|
|
384
|
+
} else if (expected instanceof Error) {
|
|
385
|
+
pass = error?.message === expected.message;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (isNot ? pass : !pass) {
|
|
390
|
+
throw AssertionError(
|
|
391
|
+
isNot
|
|
392
|
+
? \`Expected function not to throw\`
|
|
393
|
+
: threw
|
|
394
|
+
? \`Expected error message to match \${format(expected)}, got \${format(error?.message)}\`
|
|
395
|
+
: \`Expected function to throw\`,
|
|
396
|
+
'toThrow',
|
|
397
|
+
expected,
|
|
398
|
+
error
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
|
|
403
|
+
// Match
|
|
404
|
+
toMatch(pattern) {
|
|
405
|
+
const regex = typeof pattern === 'string' ? new RegExp(pattern) : pattern;
|
|
406
|
+
const pass = regex.test(actual);
|
|
407
|
+
if (isNot ? pass : !pass) {
|
|
408
|
+
throw AssertionError(
|
|
409
|
+
isNot
|
|
410
|
+
? \`Expected \${format(actual)} not to match \${format(pattern)}\`
|
|
411
|
+
: \`Expected \${format(actual)} to match \${format(pattern)}\`,
|
|
412
|
+
'toMatch',
|
|
413
|
+
pattern,
|
|
414
|
+
actual
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
// Match object
|
|
420
|
+
toMatchObject(expected) {
|
|
421
|
+
function matches(actual, expected) {
|
|
422
|
+
if (typeof expected !== 'object' || expected === null) {
|
|
423
|
+
return deepEqual(actual, expected);
|
|
424
|
+
}
|
|
425
|
+
for (const key of Object.keys(expected)) {
|
|
426
|
+
if (!matches(actual?.[key], expected[key])) return false;
|
|
427
|
+
}
|
|
428
|
+
return true;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const pass = matches(actual, expected);
|
|
432
|
+
if (isNot ? pass : !pass) {
|
|
433
|
+
throw AssertionError(
|
|
434
|
+
isNot
|
|
435
|
+
? \`Expected \${format(actual)} not to match object \${format(expected)}\`
|
|
436
|
+
: \`Expected \${format(actual)} to match object \${format(expected)}\`,
|
|
437
|
+
'toMatchObject',
|
|
438
|
+
expected,
|
|
439
|
+
actual
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
|
|
444
|
+
// Instance of
|
|
445
|
+
toBeInstanceOf(expected) {
|
|
446
|
+
const pass = actual instanceof expected;
|
|
447
|
+
if (isNot ? pass : !pass) {
|
|
448
|
+
throw AssertionError(
|
|
449
|
+
isNot
|
|
450
|
+
? \`Expected \${format(actual)} not to be instance of \${expected?.name || expected}\`
|
|
451
|
+
: \`Expected \${format(actual)} to be instance of \${expected?.name || expected}\`,
|
|
452
|
+
'toBeInstanceOf',
|
|
453
|
+
expected?.name || expected,
|
|
454
|
+
actual?.constructor?.name || actual
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// Add .not modifier
|
|
461
|
+
if (!isNot) {
|
|
462
|
+
matchers.not = createMatchers(actual, true);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
return matchers;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// Create promise matchers
|
|
469
|
+
function createPromiseMatchers(promise, isRejects) {
|
|
470
|
+
return {
|
|
471
|
+
async toBe(expected) {
|
|
472
|
+
try {
|
|
473
|
+
const result = await promise;
|
|
474
|
+
if (isRejects) {
|
|
475
|
+
throw AssertionError('Expected promise to reject', 'rejects.toBe', 'rejection', result);
|
|
476
|
+
}
|
|
477
|
+
expect(result).toBe(expected);
|
|
478
|
+
} catch (error) {
|
|
479
|
+
if (error.name === 'AssertionError') throw error;
|
|
480
|
+
if (!isRejects) throw error;
|
|
481
|
+
expect(error).toBe(expected);
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
async toEqual(expected) {
|
|
485
|
+
try {
|
|
486
|
+
const result = await promise;
|
|
487
|
+
if (isRejects) {
|
|
488
|
+
throw AssertionError('Expected promise to reject', 'rejects.toEqual', 'rejection', result);
|
|
489
|
+
}
|
|
490
|
+
expect(result).toEqual(expected);
|
|
491
|
+
} catch (error) {
|
|
492
|
+
if (error.name === 'AssertionError') throw error;
|
|
493
|
+
if (!isRejects) throw error;
|
|
494
|
+
expect(error).toEqual(expected);
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
async toBeTruthy() {
|
|
498
|
+
try {
|
|
499
|
+
const result = await promise;
|
|
500
|
+
if (isRejects) {
|
|
501
|
+
throw AssertionError('Expected promise to reject', 'rejects.toBeTruthy', 'rejection', result);
|
|
502
|
+
}
|
|
503
|
+
expect(result).toBeTruthy();
|
|
504
|
+
} catch (error) {
|
|
505
|
+
if (error.name === 'AssertionError') throw error;
|
|
506
|
+
if (!isRejects) throw error;
|
|
507
|
+
expect(error).toBeTruthy();
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
async toBeFalsy() {
|
|
511
|
+
try {
|
|
512
|
+
const result = await promise;
|
|
513
|
+
if (isRejects) {
|
|
514
|
+
throw AssertionError('Expected promise to reject', 'rejects.toBeFalsy', 'rejection', result);
|
|
515
|
+
}
|
|
516
|
+
expect(result).toBeFalsy();
|
|
517
|
+
} catch (error) {
|
|
518
|
+
if (error.name === 'AssertionError') throw error;
|
|
519
|
+
if (!isRejects) throw error;
|
|
520
|
+
expect(error).toBeFalsy();
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
async toBeNull() {
|
|
524
|
+
try {
|
|
525
|
+
const result = await promise;
|
|
526
|
+
if (isRejects) {
|
|
527
|
+
throw AssertionError('Expected promise to reject', 'rejects.toBeNull', 'rejection', result);
|
|
528
|
+
}
|
|
529
|
+
expect(result).toBeNull();
|
|
530
|
+
} catch (error) {
|
|
531
|
+
if (error.name === 'AssertionError') throw error;
|
|
532
|
+
if (!isRejects) throw error;
|
|
533
|
+
expect(error).toBeNull();
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
async toBeUndefined() {
|
|
537
|
+
try {
|
|
538
|
+
const result = await promise;
|
|
539
|
+
if (isRejects) {
|
|
540
|
+
throw AssertionError('Expected promise to reject', 'rejects.toBeUndefined', 'rejection', result);
|
|
541
|
+
}
|
|
542
|
+
expect(result).toBeUndefined();
|
|
543
|
+
} catch (error) {
|
|
544
|
+
if (error.name === 'AssertionError') throw error;
|
|
545
|
+
if (!isRejects) throw error;
|
|
546
|
+
expect(error).toBeUndefined();
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
async toBeDefined() {
|
|
550
|
+
try {
|
|
551
|
+
const result = await promise;
|
|
552
|
+
if (isRejects) {
|
|
553
|
+
throw AssertionError('Expected promise to reject', 'rejects.toBeDefined', 'rejection', result);
|
|
554
|
+
}
|
|
555
|
+
expect(result).toBeDefined();
|
|
556
|
+
} catch (error) {
|
|
557
|
+
if (error.name === 'AssertionError') throw error;
|
|
558
|
+
if (!isRejects) throw error;
|
|
559
|
+
expect(error).toBeDefined();
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
async toThrow(expected) {
|
|
563
|
+
if (!isRejects) {
|
|
564
|
+
throw AssertionError('toThrow can only be used with rejects', 'toThrow', 'rejects', 'resolves');
|
|
565
|
+
}
|
|
566
|
+
try {
|
|
567
|
+
await promise;
|
|
568
|
+
throw AssertionError('Expected promise to reject', 'rejects.toThrow', 'rejection', 'resolved');
|
|
569
|
+
} catch (error) {
|
|
570
|
+
if (error.name === 'AssertionError') throw error;
|
|
571
|
+
if (expected !== undefined) {
|
|
572
|
+
if (typeof expected === 'string' && !error?.message?.includes(expected)) {
|
|
573
|
+
throw AssertionError(
|
|
574
|
+
\`Expected error message to include "\${expected}", got "\${error?.message}"\`,
|
|
575
|
+
'rejects.toThrow',
|
|
576
|
+
expected,
|
|
577
|
+
error?.message
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
if (expected instanceof RegExp && !expected.test(error?.message)) {
|
|
581
|
+
throw AssertionError(
|
|
582
|
+
\`Expected error message to match \${expected}, got "\${error?.message}"\`,
|
|
583
|
+
'rejects.toThrow',
|
|
584
|
+
expected,
|
|
585
|
+
error?.message
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// Main expect function
|
|
595
|
+
function expect(actual) {
|
|
596
|
+
const matchers = createMatchers(actual, false);
|
|
597
|
+
|
|
598
|
+
// Add .resolves modifier
|
|
599
|
+
matchers.resolves = createPromiseMatchers(Promise.resolve(actual), false);
|
|
600
|
+
|
|
601
|
+
// Add .rejects modifier
|
|
602
|
+
matchers.rejects = createPromiseMatchers(actual, true);
|
|
603
|
+
|
|
604
|
+
return matchers;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// Expose globally
|
|
608
|
+
globalThis.expect = expect;
|
|
609
|
+
})();
|
|
610
|
+
`;
|
|
611
|
+
const result = context.evalCode(expectCode);
|
|
612
|
+
if (result.error) {
|
|
613
|
+
const errorDump = context.dump(result.error);
|
|
614
|
+
result.error.dispose();
|
|
615
|
+
throw new Error(`Failed to setup expect: ${errorDump}`);
|
|
616
|
+
}
|
|
617
|
+
result.value.dispose();
|
|
618
|
+
return handles;
|
|
619
|
+
}
|
|
620
|
+
})
|
|
621
|
+
|
|
622
|
+
//# debugId=23905AB9BA5D77BD64756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/globals/expect.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { QuickJSContext, QuickJSHandle } from \"quickjs-emscripten\";\nimport type { TestState } from \"../types.ts\";\n\nexport function setupExpect(\n context: QuickJSContext,\n state: TestState\n): QuickJSHandle[] {\n const handles: QuickJSHandle[] = [];\n\n // Implement expect entirely in JavaScript for simplicity\n const expectCode = `\n(function() {\n // Deep equality check\n function deepEqual(a, b) {\n if (a === b) return true;\n if (a === null || b === null) return false;\n if (typeof a !== typeof b) return false;\n\n if (typeof a === 'object') {\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n\n if (Array.isArray(a)) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i])) return false;\n }\n return true;\n }\n\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (!deepEqual(a[key], b[key])) return false;\n }\n return true;\n }\n\n return false;\n }\n\n // Strict equality (checks undefined values and array holes)\n function strictEqual(a, b) {\n if (!deepEqual(a, b)) return false;\n\n if (typeof a === 'object' && a !== null) {\n if (Array.isArray(a)) {\n // Check for sparse arrays\n for (let i = 0; i < a.length; i++) {\n if ((i in a) !== (i in b)) return false;\n }\n } else {\n // Check for undefined values\n const keysA = Object.keys(a);\n for (const key of keysA) {\n if (a[key] === undefined && !(key in b)) return false;\n }\n }\n }\n\n return true;\n }\n\n // Format value for error messages\n function format(value) {\n if (value === undefined) return 'undefined';\n if (value === null) return 'null';\n if (typeof value === 'string') return JSON.stringify(value);\n if (typeof value === 'function') return '[Function]';\n if (typeof value === 'symbol') return value.toString();\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n }\n\n // Create assertion error\n function AssertionError(message, matcherName, expected, actual) {\n const error = new Error(message);\n error.name = 'AssertionError';\n error.matcherName = matcherName;\n error.expected = expected;\n error.actual = actual;\n return error;\n }\n\n // Create matchers object\n function createMatchers(actual, isNot) {\n const matchers = {\n // Strict equality (===)\n toBe(expected) {\n const pass = actual === expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to be \\${format(expected)}\\`,\n 'toBe',\n expected,\n actual\n );\n }\n },\n\n // Deep equality\n toEqual(expected) {\n const pass = deepEqual(actual, expected);\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to equal \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to equal \\${format(expected)}\\`,\n 'toEqual',\n expected,\n actual\n );\n }\n },\n\n // Strict deep equality\n toStrictEqual(expected) {\n const pass = strictEqual(actual, expected);\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to strictly equal \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to strictly equal \\${format(expected)}\\`,\n 'toStrictEqual',\n expected,\n actual\n );\n }\n },\n\n // Truthy/Falsy\n toBeTruthy() {\n const pass = !!actual;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be truthy\\`\n : \\`Expected \\${format(actual)} to be truthy\\`,\n 'toBeTruthy',\n 'truthy value',\n actual\n );\n }\n },\n\n toBeFalsy() {\n const pass = !actual;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be falsy\\`\n : \\`Expected \\${format(actual)} to be falsy\\`,\n 'toBeFalsy',\n 'falsy value',\n actual\n );\n }\n },\n\n // Null/Undefined/Defined\n toBeNull() {\n const pass = actual === null;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be null\\`\n : \\`Expected \\${format(actual)} to be null\\`,\n 'toBeNull',\n null,\n actual\n );\n }\n },\n\n toBeUndefined() {\n const pass = actual === undefined;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be undefined\\`\n : \\`Expected \\${format(actual)} to be undefined\\`,\n 'toBeUndefined',\n undefined,\n actual\n );\n }\n },\n\n toBeDefined() {\n const pass = actual !== undefined;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} to be undefined\\`\n : \\`Expected \\${format(actual)} to be defined\\`,\n 'toBeDefined',\n 'defined value',\n actual\n );\n }\n },\n\n toBeNaN() {\n const pass = Number.isNaN(actual);\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be NaN\\`\n : \\`Expected \\${format(actual)} to be NaN\\`,\n 'toBeNaN',\n NaN,\n actual\n );\n }\n },\n\n // Numeric comparisons\n toBeGreaterThan(expected) {\n const pass = actual > expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be greater than \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to be greater than \\${format(expected)}\\`,\n 'toBeGreaterThan',\n expected,\n actual\n );\n }\n },\n\n toBeGreaterThanOrEqual(expected) {\n const pass = actual >= expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be greater than or equal to \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to be greater than or equal to \\${format(expected)}\\`,\n 'toBeGreaterThanOrEqual',\n expected,\n actual\n );\n }\n },\n\n toBeLessThan(expected) {\n const pass = actual < expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be less than \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to be less than \\${format(expected)}\\`,\n 'toBeLessThan',\n expected,\n actual\n );\n }\n },\n\n toBeLessThanOrEqual(expected) {\n const pass = actual <= expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be less than or equal to \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to be less than or equal to \\${format(expected)}\\`,\n 'toBeLessThanOrEqual',\n expected,\n actual\n );\n }\n },\n\n // Contains\n toContain(expected) {\n let pass = false;\n if (typeof actual === 'string') {\n pass = actual.includes(expected);\n } else if (Array.isArray(actual)) {\n pass = actual.includes(expected);\n }\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to contain \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to contain \\${format(expected)}\\`,\n 'toContain',\n expected,\n actual\n );\n }\n },\n\n // Length\n toHaveLength(expected) {\n const actualLength = actual?.length;\n const pass = actualLength === expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected length not to be \\${expected}, but got \\${actualLength}\\`\n : \\`Expected length to be \\${expected}, but got \\${actualLength}\\`,\n 'toHaveLength',\n expected,\n actualLength\n );\n }\n },\n\n // Property\n toHaveProperty(key, value) {\n const hasKey = key in Object(actual);\n let pass = hasKey;\n if (hasKey && arguments.length > 1) {\n pass = deepEqual(actual[key], value);\n }\n if (isNot ? pass : !pass) {\n const message = arguments.length > 1\n ? (isNot\n ? \\`Expected \\${format(actual)} not to have property \"\\${key}\" with value \\${format(value)}\\`\n : \\`Expected \\${format(actual)} to have property \"\\${key}\" with value \\${format(value)}\\`)\n : (isNot\n ? \\`Expected \\${format(actual)} not to have property \"\\${key}\"\\`\n : \\`Expected \\${format(actual)} to have property \"\\${key}\"\\`);\n throw AssertionError(message, 'toHaveProperty', value, actual?.[key]);\n }\n },\n\n // Throws\n toThrow(expected) {\n if (typeof actual !== 'function') {\n throw AssertionError('Expected a function', 'toThrow', 'function', typeof actual);\n }\n\n let threw = false;\n let error;\n try {\n actual();\n } catch (e) {\n threw = true;\n error = e;\n }\n\n let pass = threw;\n if (threw && expected !== undefined) {\n if (typeof expected === 'string') {\n pass = error?.message?.includes(expected);\n } else if (expected instanceof RegExp) {\n pass = expected.test(error?.message);\n } else if (expected instanceof Error) {\n pass = error?.message === expected.message;\n }\n }\n\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected function not to throw\\`\n : threw\n ? \\`Expected error message to match \\${format(expected)}, got \\${format(error?.message)}\\`\n : \\`Expected function to throw\\`,\n 'toThrow',\n expected,\n error\n );\n }\n },\n\n // Match\n toMatch(pattern) {\n const regex = typeof pattern === 'string' ? new RegExp(pattern) : pattern;\n const pass = regex.test(actual);\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to match \\${format(pattern)}\\`\n : \\`Expected \\${format(actual)} to match \\${format(pattern)}\\`,\n 'toMatch',\n pattern,\n actual\n );\n }\n },\n\n // Match object\n toMatchObject(expected) {\n function matches(actual, expected) {\n if (typeof expected !== 'object' || expected === null) {\n return deepEqual(actual, expected);\n }\n for (const key of Object.keys(expected)) {\n if (!matches(actual?.[key], expected[key])) return false;\n }\n return true;\n }\n\n const pass = matches(actual, expected);\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to match object \\${format(expected)}\\`\n : \\`Expected \\${format(actual)} to match object \\${format(expected)}\\`,\n 'toMatchObject',\n expected,\n actual\n );\n }\n },\n\n // Instance of\n toBeInstanceOf(expected) {\n const pass = actual instanceof expected;\n if (isNot ? pass : !pass) {\n throw AssertionError(\n isNot\n ? \\`Expected \\${format(actual)} not to be instance of \\${expected?.name || expected}\\`\n : \\`Expected \\${format(actual)} to be instance of \\${expected?.name || expected}\\`,\n 'toBeInstanceOf',\n expected?.name || expected,\n actual?.constructor?.name || actual\n );\n }\n },\n };\n\n // Add .not modifier\n if (!isNot) {\n matchers.not = createMatchers(actual, true);\n }\n\n return matchers;\n }\n\n // Create promise matchers\n function createPromiseMatchers(promise, isRejects) {\n return {\n async toBe(expected) {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toBe', 'rejection', result);\n }\n expect(result).toBe(expected);\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toBe(expected);\n }\n },\n async toEqual(expected) {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toEqual', 'rejection', result);\n }\n expect(result).toEqual(expected);\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toEqual(expected);\n }\n },\n async toBeTruthy() {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toBeTruthy', 'rejection', result);\n }\n expect(result).toBeTruthy();\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toBeTruthy();\n }\n },\n async toBeFalsy() {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toBeFalsy', 'rejection', result);\n }\n expect(result).toBeFalsy();\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toBeFalsy();\n }\n },\n async toBeNull() {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toBeNull', 'rejection', result);\n }\n expect(result).toBeNull();\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toBeNull();\n }\n },\n async toBeUndefined() {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toBeUndefined', 'rejection', result);\n }\n expect(result).toBeUndefined();\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toBeUndefined();\n }\n },\n async toBeDefined() {\n try {\n const result = await promise;\n if (isRejects) {\n throw AssertionError('Expected promise to reject', 'rejects.toBeDefined', 'rejection', result);\n }\n expect(result).toBeDefined();\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (!isRejects) throw error;\n expect(error).toBeDefined();\n }\n },\n async toThrow(expected) {\n if (!isRejects) {\n throw AssertionError('toThrow can only be used with rejects', 'toThrow', 'rejects', 'resolves');\n }\n try {\n await promise;\n throw AssertionError('Expected promise to reject', 'rejects.toThrow', 'rejection', 'resolved');\n } catch (error) {\n if (error.name === 'AssertionError') throw error;\n if (expected !== undefined) {\n if (typeof expected === 'string' && !error?.message?.includes(expected)) {\n throw AssertionError(\n \\`Expected error message to include \"\\${expected}\", got \"\\${error?.message}\"\\`,\n 'rejects.toThrow',\n expected,\n error?.message\n );\n }\n if (expected instanceof RegExp && !expected.test(error?.message)) {\n throw AssertionError(\n \\`Expected error message to match \\${expected}, got \"\\${error?.message}\"\\`,\n 'rejects.toThrow',\n expected,\n error?.message\n );\n }\n }\n }\n }\n };\n }\n\n // Main expect function\n function expect(actual) {\n const matchers = createMatchers(actual, false);\n\n // Add .resolves modifier\n matchers.resolves = createPromiseMatchers(Promise.resolve(actual), false);\n\n // Add .rejects modifier\n matchers.rejects = createPromiseMatchers(actual, true);\n\n return matchers;\n }\n\n // Expose globally\n globalThis.expect = expect;\n})();\n`;\n\n const result = context.evalCode(expectCode);\n if (result.error) {\n const errorDump = context.dump(result.error);\n result.error.dispose();\n throw new Error(`Failed to setup expect: ${errorDump}`);\n }\n result.value.dispose();\n\n return handles;\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,WAAW,CACzB,SACA,OACiB;AAAA,EACjB,MAAM,UAA2B,CAAC;AAAA,EAGlC,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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