@mastra/evals 0.1.13 → 0.1.14-alpha.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.
|
@@ -189,7 +189,7 @@ function p(n = false) {
|
|
|
189
189
|
var r = process.env.FORCE_TTY !== void 0 || isatty(1);
|
|
190
190
|
var u = p(r);
|
|
191
191
|
|
|
192
|
-
// ../../node_modules/.pnpm/@vitest+pretty-format@3.0.
|
|
192
|
+
// ../../node_modules/.pnpm/@vitest+pretty-format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js
|
|
193
193
|
function _mergeNamespaces(n, m3) {
|
|
194
194
|
m3.forEach(function(e) {
|
|
195
195
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k2) {
|
|
@@ -2213,7 +2213,7 @@ function inspect(value, opts = {}) {
|
|
|
2213
2213
|
return options.stylize(String(value), type3);
|
|
2214
2214
|
}
|
|
2215
2215
|
|
|
2216
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
2216
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
2217
2217
|
var {
|
|
2218
2218
|
AsymmetricMatcher,
|
|
2219
2219
|
DOMCollection,
|
|
@@ -2282,6 +2282,9 @@ function format2(...args) {
|
|
|
2282
2282
|
return "-0";
|
|
2283
2283
|
}
|
|
2284
2284
|
if (typeof value === "object" && value !== null) {
|
|
2285
|
+
if (typeof value.toString === "function" && value.toString !== Object.prototype.toString) {
|
|
2286
|
+
return value.toString();
|
|
2287
|
+
}
|
|
2285
2288
|
return inspect2(value, { depth: 0, colors: false });
|
|
2286
2289
|
}
|
|
2287
2290
|
return String(value);
|
|
@@ -2368,7 +2371,7 @@ function getDefaultExportFromCjs2(x2) {
|
|
|
2368
2371
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
2369
2372
|
}
|
|
2370
2373
|
|
|
2371
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
2374
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js
|
|
2372
2375
|
function createSimpleStackTrace(options) {
|
|
2373
2376
|
const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
|
|
2374
2377
|
const limit = Error.stackTraceLimit;
|
|
@@ -2584,7 +2587,7 @@ function getSafeTimers() {
|
|
|
2584
2587
|
};
|
|
2585
2588
|
}
|
|
2586
2589
|
|
|
2587
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
2590
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/diff.js
|
|
2588
2591
|
var DIFF_DELETE = -1;
|
|
2589
2592
|
var DIFF_INSERT = 1;
|
|
2590
2593
|
var DIFF_EQUAL = 0;
|
|
@@ -2596,7 +2599,7 @@ var Diff = class {
|
|
|
2596
2599
|
this[1] = text;
|
|
2597
2600
|
}
|
|
2598
2601
|
};
|
|
2599
|
-
|
|
2602
|
+
function diff_commonPrefix(text1, text2) {
|
|
2600
2603
|
if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {
|
|
2601
2604
|
return 0;
|
|
2602
2605
|
}
|
|
@@ -2614,8 +2617,8 @@ var diff_commonPrefix = function(text1, text2) {
|
|
|
2614
2617
|
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
|
2615
2618
|
}
|
|
2616
2619
|
return pointermid;
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2620
|
+
}
|
|
2621
|
+
function diff_commonSuffix(text1, text2) {
|
|
2619
2622
|
if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) {
|
|
2620
2623
|
return 0;
|
|
2621
2624
|
}
|
|
@@ -2633,8 +2636,8 @@ var diff_commonSuffix = function(text1, text2) {
|
|
|
2633
2636
|
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
|
2634
2637
|
}
|
|
2635
2638
|
return pointermid;
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2639
|
+
}
|
|
2640
|
+
function diff_commonOverlap_(text1, text2) {
|
|
2638
2641
|
const text1_length = text1.length;
|
|
2639
2642
|
const text2_length = text2.length;
|
|
2640
2643
|
if (text1_length === 0 || text2_length === 0) {
|
|
@@ -2663,8 +2666,8 @@ var diff_commonOverlap_ = function(text1, text2) {
|
|
|
2663
2666
|
length++;
|
|
2664
2667
|
}
|
|
2665
2668
|
}
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2669
|
+
}
|
|
2670
|
+
function diff_cleanupSemantic(diffs) {
|
|
2668
2671
|
let changes = false;
|
|
2669
2672
|
const equalities = [];
|
|
2670
2673
|
let equalitiesLength = 0;
|
|
@@ -2754,7 +2757,7 @@ var diff_cleanupSemantic = function(diffs) {
|
|
|
2754
2757
|
}
|
|
2755
2758
|
pointer++;
|
|
2756
2759
|
}
|
|
2757
|
-
}
|
|
2760
|
+
}
|
|
2758
2761
|
var nonAlphaNumericRegex_ = /[^a-z0-9]/i;
|
|
2759
2762
|
var whitespaceRegex_ = /\s/;
|
|
2760
2763
|
var linebreakRegex_ = /[\r\n]/;
|
|
@@ -4422,7 +4425,7 @@ function C2(e, t, n) {
|
|
|
4422
4425
|
), x.add(i), i;
|
|
4423
4426
|
}
|
|
4424
4427
|
|
|
4425
|
-
// ../../node_modules/.pnpm/@vitest+spy@3.0.
|
|
4428
|
+
// ../../node_modules/.pnpm/@vitest+spy@3.0.9/node_modules/@vitest/spy/dist/index.js
|
|
4426
4429
|
var mocks = /* @__PURE__ */ new Set();
|
|
4427
4430
|
function isMockFunction(fn2) {
|
|
4428
4431
|
return typeof fn2 === "function" && "_isMockFunction" in fn2 && fn2._isMockFunction;
|
|
@@ -4564,7 +4567,7 @@ function fn(implementation) {
|
|
|
4564
4567
|
return enhancedSpy;
|
|
4565
4568
|
}
|
|
4566
4569
|
|
|
4567
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
4570
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/error.js
|
|
4568
4571
|
var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
4569
4572
|
var IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
4570
4573
|
function isImmutable(v) {
|
|
@@ -8693,7 +8696,7 @@ function use(fn2) {
|
|
|
8693
8696
|
}
|
|
8694
8697
|
__name(use, "use");
|
|
8695
8698
|
|
|
8696
|
-
// ../../node_modules/.pnpm/@vitest+expect@3.0.
|
|
8699
|
+
// ../../node_modules/.pnpm/@vitest+expect@3.0.9/node_modules/@vitest/expect/dist/index.js
|
|
8697
8700
|
var MATCHERS_OBJECT = Symbol.for("matchers-object");
|
|
8698
8701
|
var JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object");
|
|
8699
8702
|
var GLOBAL_EXPECT = Symbol.for("expect-global");
|
|
@@ -9473,7 +9476,7 @@ var Any = class extends AsymmetricMatcher3 {
|
|
|
9473
9476
|
return typeof other == "number" || other instanceof Number;
|
|
9474
9477
|
}
|
|
9475
9478
|
if (this.sample === Function) {
|
|
9476
|
-
return typeof other == "function" || other
|
|
9479
|
+
return typeof other == "function" || typeof other === "function";
|
|
9477
9480
|
}
|
|
9478
9481
|
if (this.sample === Boolean) {
|
|
9479
9482
|
return typeof other == "boolean" || other instanceof Boolean;
|
|
@@ -10148,12 +10151,15 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10148
10151
|
throw new AssertionError2(msg);
|
|
10149
10152
|
}
|
|
10150
10153
|
});
|
|
10154
|
+
function equalsArgumentArray(a3, b) {
|
|
10155
|
+
return a3.length === b.length && a3.every(
|
|
10156
|
+
(aItem, i) => equals(aItem, b[i], [...customTesters, iterableEquality])
|
|
10157
|
+
);
|
|
10158
|
+
}
|
|
10151
10159
|
def(["toHaveBeenCalledWith", "toBeCalledWith"], function(...args) {
|
|
10152
10160
|
const spy = getSpy(this);
|
|
10153
10161
|
const spyName = spy.getMockName();
|
|
10154
|
-
const pass = spy.mock.calls.some(
|
|
10155
|
-
(callArg) => equals(callArg, args, [...customTesters, iterableEquality])
|
|
10156
|
-
);
|
|
10162
|
+
const pass = spy.mock.calls.some((callArg) => equalsArgumentArray(callArg, args));
|
|
10157
10163
|
const isNot = utils.flag(this, "negate");
|
|
10158
10164
|
const msg = utils.getMessage(this, [
|
|
10159
10165
|
pass,
|
|
@@ -10169,9 +10175,7 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10169
10175
|
const spy = getSpy(this);
|
|
10170
10176
|
const spyName = spy.getMockName();
|
|
10171
10177
|
const callCount = spy.mock.calls.length;
|
|
10172
|
-
const hasCallWithArgs = spy.mock.calls.some(
|
|
10173
|
-
(callArg) => equals(callArg, args, [...customTesters, iterableEquality])
|
|
10174
|
-
);
|
|
10178
|
+
const hasCallWithArgs = spy.mock.calls.some((callArg) => equalsArgumentArray(callArg, args));
|
|
10175
10179
|
const pass = hasCallWithArgs && callCount === 1;
|
|
10176
10180
|
const isNot = utils.flag(this, "negate");
|
|
10177
10181
|
const msg = utils.getMessage(this, [
|
|
@@ -10193,7 +10197,7 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10193
10197
|
const callCount = spy.mock.calls.length;
|
|
10194
10198
|
const isCalled = times <= callCount;
|
|
10195
10199
|
this.assert(
|
|
10196
|
-
|
|
10200
|
+
nthCall && equalsArgumentArray(nthCall, args),
|
|
10197
10201
|
`expected ${ordinalOf(
|
|
10198
10202
|
times
|
|
10199
10203
|
)} "${spyName}" call to have been called with #{exp}${isCalled ? `` : `, but called only ${callCount} times`}`,
|
|
@@ -10213,7 +10217,7 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10213
10217
|
const spyName = spy.getMockName();
|
|
10214
10218
|
const lastCall = spy.mock.calls[spy.mock.calls.length - 1];
|
|
10215
10219
|
this.assert(
|
|
10216
|
-
|
|
10220
|
+
lastCall && equalsArgumentArray(lastCall, args),
|
|
10217
10221
|
`expected last "${spyName}" call to have been called with #{exp}`,
|
|
10218
10222
|
`expected last "${spyName}" call to not have been called with #{exp}`,
|
|
10219
10223
|
args,
|
|
@@ -11150,7 +11154,7 @@ var isAbsolute2 = function(p3) {
|
|
|
11150
11154
|
return _IS_ABSOLUTE_RE2.test(p3);
|
|
11151
11155
|
};
|
|
11152
11156
|
|
|
11153
|
-
// ../../node_modules/.pnpm/@vitest+runner@3.0.
|
|
11157
|
+
// ../../node_modules/.pnpm/@vitest+runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js
|
|
11154
11158
|
function createChainable(keys2, fn2) {
|
|
11155
11159
|
function create(context) {
|
|
11156
11160
|
const chain2 = function(...args) {
|
|
@@ -11195,7 +11199,7 @@ function getTestName(task, separator = " > ") {
|
|
|
11195
11199
|
return getNames(task).slice(1).join(separator);
|
|
11196
11200
|
}
|
|
11197
11201
|
|
|
11198
|
-
// ../../node_modules/.pnpm/@vitest+runner@3.0.
|
|
11202
|
+
// ../../node_modules/.pnpm/@vitest+runner@3.0.9/node_modules/@vitest/runner/dist/index.js
|
|
11199
11203
|
var PendingError = class extends Error {
|
|
11200
11204
|
constructor(message, task, note) {
|
|
11201
11205
|
super(message);
|
|
@@ -11220,7 +11224,7 @@ async function runWithSuite(suite2, fn2) {
|
|
|
11220
11224
|
await fn2();
|
|
11221
11225
|
collectorContext.currentSuite = prev;
|
|
11222
11226
|
}
|
|
11223
|
-
function withTimeout(fn2, timeout, isHook = false) {
|
|
11227
|
+
function withTimeout(fn2, timeout, isHook = false, stackTraceError) {
|
|
11224
11228
|
if (timeout <= 0 || timeout === Number.POSITIVE_INFINITY) {
|
|
11225
11229
|
return fn2;
|
|
11226
11230
|
}
|
|
@@ -11231,13 +11235,16 @@ function withTimeout(fn2, timeout, isHook = false) {
|
|
|
11231
11235
|
var _a;
|
|
11232
11236
|
const timer = setTimeout(() => {
|
|
11233
11237
|
clearTimeout(timer);
|
|
11234
|
-
|
|
11238
|
+
rejectTimeoutError();
|
|
11235
11239
|
}, timeout);
|
|
11236
11240
|
(_a = timer.unref) == null ? void 0 : _a.call(timer);
|
|
11241
|
+
function rejectTimeoutError() {
|
|
11242
|
+
reject_(makeTimeoutError(isHook, timeout, stackTraceError));
|
|
11243
|
+
}
|
|
11237
11244
|
function resolve4(result) {
|
|
11238
11245
|
clearTimeout(timer);
|
|
11239
11246
|
if (now$2() - startTime >= timeout) {
|
|
11240
|
-
|
|
11247
|
+
rejectTimeoutError();
|
|
11241
11248
|
return;
|
|
11242
11249
|
}
|
|
11243
11250
|
resolve_(result);
|
|
@@ -11273,20 +11280,25 @@ function createTestContext(test5, runner2) {
|
|
|
11273
11280
|
context.onTestFailed = (handler, timeout) => {
|
|
11274
11281
|
test5.onFailed || (test5.onFailed = []);
|
|
11275
11282
|
test5.onFailed.push(
|
|
11276
|
-
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true)
|
|
11283
|
+
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true, new Error("STACK_TRACE_ERROR"))
|
|
11277
11284
|
);
|
|
11278
11285
|
};
|
|
11279
11286
|
context.onTestFinished = (handler, timeout) => {
|
|
11280
11287
|
test5.onFinished || (test5.onFinished = []);
|
|
11281
11288
|
test5.onFinished.push(
|
|
11282
|
-
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true)
|
|
11289
|
+
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true, new Error("STACK_TRACE_ERROR"))
|
|
11283
11290
|
);
|
|
11284
11291
|
};
|
|
11285
11292
|
return ((_a = runner2.extendTaskContext) == null ? void 0 : _a.call(runner2, context)) || context;
|
|
11286
11293
|
}
|
|
11287
|
-
function
|
|
11288
|
-
|
|
11294
|
+
function makeTimeoutError(isHook, timeout, stackTraceError) {
|
|
11295
|
+
const message = `${isHook ? "Hook" : "Test"} timed out in ${timeout}ms.
|
|
11289
11296
|
If this is a long-running ${isHook ? "hook" : "test"}, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
|
|
11297
|
+
const error = new Error(message);
|
|
11298
|
+
if (stackTraceError == null ? void 0 : stackTraceError.stack) {
|
|
11299
|
+
error.stack = stackTraceError.stack.replace(error.message, stackTraceError.message);
|
|
11300
|
+
}
|
|
11301
|
+
return error;
|
|
11290
11302
|
}
|
|
11291
11303
|
var fnMap = /* @__PURE__ */ new WeakMap();
|
|
11292
11304
|
var fixtureMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -11572,6 +11584,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
11572
11584
|
initSuite();
|
|
11573
11585
|
const task = function(name2 = "", options = {}) {
|
|
11574
11586
|
var _a;
|
|
11587
|
+
const timeout = (options == null ? void 0 : options.timeout) ?? runner.config.testTimeout;
|
|
11575
11588
|
const task2 = {
|
|
11576
11589
|
id: "",
|
|
11577
11590
|
name: name2,
|
|
@@ -11581,6 +11594,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
11581
11594
|
context: void 0,
|
|
11582
11595
|
type: "test",
|
|
11583
11596
|
file: void 0,
|
|
11597
|
+
timeout,
|
|
11584
11598
|
retry: options.retry ?? runner.config.retry,
|
|
11585
11599
|
repeats: options.repeats,
|
|
11586
11600
|
mode: options.only ? "only" : options.skip ? "skip" : options.todo ? "todo" : "run",
|
|
@@ -11602,7 +11616,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
11602
11616
|
task2,
|
|
11603
11617
|
withTimeout(
|
|
11604
11618
|
withAwaitAsyncAssertions(withFixtures(handler, context), task2),
|
|
11605
|
-
|
|
11619
|
+
timeout
|
|
11606
11620
|
)
|
|
11607
11621
|
);
|
|
11608
11622
|
}
|
|
@@ -11877,7 +11891,7 @@ function createTest(fn2, context) {
|
|
|
11877
11891
|
return createTaskCollector(fn2, context);
|
|
11878
11892
|
}
|
|
11879
11893
|
function formatName(name) {
|
|
11880
|
-
return typeof name === "string" ? name : name
|
|
11894
|
+
return typeof name === "string" ? name : typeof name === "function" ? name.name || "<anonymous>" : String(name);
|
|
11881
11895
|
}
|
|
11882
11896
|
function formatTitle(template, items, idx) {
|
|
11883
11897
|
if (template.includes("%#")) {
|
|
@@ -11945,27 +11959,54 @@ function getDefaultHookTimeout() {
|
|
|
11945
11959
|
return getRunner().config.hookTimeout;
|
|
11946
11960
|
}
|
|
11947
11961
|
var CLEANUP_TIMEOUT_KEY = Symbol.for("VITEST_CLEANUP_TIMEOUT");
|
|
11962
|
+
var CLEANUP_STACK_TRACE_KEY = Symbol.for("VITEST_CLEANUP_STACK_TRACE");
|
|
11948
11963
|
function beforeAll(fn2, timeout = getDefaultHookTimeout()) {
|
|
11949
11964
|
assertTypes(fn2, '"beforeAll" callback', ["function"]);
|
|
11965
|
+
const stackTraceError = new Error("STACK_TRACE_ERROR");
|
|
11950
11966
|
return getCurrentSuite().on(
|
|
11951
11967
|
"beforeAll",
|
|
11952
|
-
Object.assign(
|
|
11968
|
+
Object.assign(
|
|
11969
|
+
withTimeout(
|
|
11970
|
+
fn2,
|
|
11971
|
+
timeout,
|
|
11972
|
+
true,
|
|
11973
|
+
stackTraceError
|
|
11974
|
+
),
|
|
11975
|
+
{
|
|
11976
|
+
[CLEANUP_TIMEOUT_KEY]: timeout,
|
|
11977
|
+
[CLEANUP_STACK_TRACE_KEY]: stackTraceError
|
|
11978
|
+
}
|
|
11979
|
+
)
|
|
11953
11980
|
);
|
|
11954
11981
|
}
|
|
11955
11982
|
function afterAll(fn2, timeout) {
|
|
11956
11983
|
assertTypes(fn2, '"afterAll" callback', ["function"]);
|
|
11957
11984
|
return getCurrentSuite().on(
|
|
11958
11985
|
"afterAll",
|
|
11959
|
-
withTimeout(
|
|
11986
|
+
withTimeout(
|
|
11987
|
+
fn2,
|
|
11988
|
+
timeout ?? getDefaultHookTimeout(),
|
|
11989
|
+
true,
|
|
11990
|
+
new Error("STACK_TRACE_ERROR")
|
|
11991
|
+
)
|
|
11960
11992
|
);
|
|
11961
11993
|
}
|
|
11962
11994
|
function beforeEach(fn2, timeout = getDefaultHookTimeout()) {
|
|
11963
11995
|
assertTypes(fn2, '"beforeEach" callback', ["function"]);
|
|
11996
|
+
const stackTraceError = new Error("STACK_TRACE_ERROR");
|
|
11964
11997
|
return getCurrentSuite().on(
|
|
11965
11998
|
"beforeEach",
|
|
11966
11999
|
Object.assign(
|
|
11967
|
-
withTimeout(
|
|
11968
|
-
|
|
12000
|
+
withTimeout(
|
|
12001
|
+
withFixtures(fn2),
|
|
12002
|
+
timeout ?? getDefaultHookTimeout(),
|
|
12003
|
+
true,
|
|
12004
|
+
stackTraceError
|
|
12005
|
+
),
|
|
12006
|
+
{
|
|
12007
|
+
[CLEANUP_TIMEOUT_KEY]: timeout,
|
|
12008
|
+
[CLEANUP_STACK_TRACE_KEY]: stackTraceError
|
|
12009
|
+
}
|
|
11969
12010
|
)
|
|
11970
12011
|
);
|
|
11971
12012
|
}
|
|
@@ -11973,7 +12014,12 @@ function afterEach(fn2, timeout) {
|
|
|
11973
12014
|
assertTypes(fn2, '"afterEach" callback', ["function"]);
|
|
11974
12015
|
return getCurrentSuite().on(
|
|
11975
12016
|
"afterEach",
|
|
11976
|
-
withTimeout(
|
|
12017
|
+
withTimeout(
|
|
12018
|
+
withFixtures(fn2),
|
|
12019
|
+
timeout ?? getDefaultHookTimeout(),
|
|
12020
|
+
true,
|
|
12021
|
+
new Error("STACK_TRACE_ERROR")
|
|
12022
|
+
)
|
|
11977
12023
|
);
|
|
11978
12024
|
}
|
|
11979
12025
|
var onTestFailed = createTestHook(
|
|
@@ -11991,7 +12037,7 @@ function createTestHook(name, handler) {
|
|
|
11991
12037
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
11992
12038
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
11993
12039
|
|
|
11994
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
12040
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
|
|
11995
12041
|
var NAME_WORKER_STATE = "__vitest_worker__";
|
|
11996
12042
|
function getWorkerState() {
|
|
11997
12043
|
const workerState = globalThis[NAME_WORKER_STATE];
|
|
@@ -12051,13 +12097,13 @@ async function waitForImportsToResolve() {
|
|
|
12051
12097
|
await waitForImportsToResolve();
|
|
12052
12098
|
}
|
|
12053
12099
|
|
|
12054
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
12100
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
|
|
12055
12101
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
12056
12102
|
function getDefaultExportFromCjs3(x2) {
|
|
12057
12103
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
12058
12104
|
}
|
|
12059
12105
|
|
|
12060
|
-
// ../../node_modules/.pnpm/@vitest+snapshot@3.0.
|
|
12106
|
+
// ../../node_modules/.pnpm/@vitest+snapshot@3.0.9/node_modules/@vitest/snapshot/dist/index.js
|
|
12061
12107
|
var comma2 = ",".charCodeAt(0);
|
|
12062
12108
|
var chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
12063
12109
|
var intToChar2 = new Uint8Array(64);
|
|
@@ -13784,7 +13830,7 @@ var SnapshotClient = class {
|
|
|
13784
13830
|
}
|
|
13785
13831
|
};
|
|
13786
13832
|
|
|
13787
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
13833
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
|
|
13788
13834
|
var RealDate = Date;
|
|
13789
13835
|
var now2 = null;
|
|
13790
13836
|
var MockDate = class _MockDate extends RealDate {
|
|
@@ -13837,7 +13883,7 @@ function resetDate() {
|
|
|
13837
13883
|
globalThis.Date = RealDate;
|
|
13838
13884
|
}
|
|
13839
13885
|
|
|
13840
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
13886
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/vi.nSCvwQ7l.js
|
|
13841
13887
|
var unsupported = [
|
|
13842
13888
|
// .poll is meant to retry matchers until they succeed, and
|
|
13843
13889
|
// snapshots will always succeed as long as the poll method doesn't throw an error
|
|
@@ -13917,7 +13963,7 @@ function createExpectPoll(expect2) {
|
|
|
13917
13963
|
const rejectWithCause = (cause) => {
|
|
13918
13964
|
reject(
|
|
13919
13965
|
copyStackTrace$1(
|
|
13920
|
-
new Error(
|
|
13966
|
+
new Error("Matcher did not succeed in time.", {
|
|
13921
13967
|
cause
|
|
13922
13968
|
}),
|
|
13923
13969
|
STACK_TRACE_ERROR
|
|
@@ -16218,9 +16264,9 @@ var FakeTimers = class {
|
|
|
16218
16264
|
// | _fakingTime | _fakingDate |
|
|
16219
16265
|
// +-------------+-------------+
|
|
16220
16266
|
// | false | falsy | initial
|
|
16221
|
-
// | false |
|
|
16267
|
+
// | false | truthy | vi.setSystemTime called first (for mocking only Date without fake timers)
|
|
16222
16268
|
// | true | falsy | vi.useFakeTimers called first
|
|
16223
|
-
// | true |
|
|
16269
|
+
// | true | truthy | unreachable
|
|
16224
16270
|
_fakingTime;
|
|
16225
16271
|
_fakingDate;
|
|
16226
16272
|
_fakeTimers;
|
|
@@ -16805,7 +16851,7 @@ function getImporter(name) {
|
|
|
16805
16851
|
return stack?.file || "";
|
|
16806
16852
|
}
|
|
16807
16853
|
|
|
16808
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16854
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/run-once.2ogXb3JV.js
|
|
16809
16855
|
var filesCount = /* @__PURE__ */ new Map();
|
|
16810
16856
|
var cache = /* @__PURE__ */ new Map();
|
|
16811
16857
|
function runOnce(fn2, key) {
|
|
@@ -16828,7 +16874,7 @@ function isFirstRun() {
|
|
|
16828
16874
|
return firstRun;
|
|
16829
16875
|
}
|
|
16830
16876
|
|
|
16831
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16877
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/benchmark.DL72EVN-.js
|
|
16832
16878
|
var benchFns = /* @__PURE__ */ new WeakMap();
|
|
16833
16879
|
var benchOptsMap = /* @__PURE__ */ new WeakMap();
|
|
16834
16880
|
var bench = createBenchmark(function(name, fn2 = noop, options = {}) {
|
|
@@ -16854,10 +16900,10 @@ function createBenchmark(fn2) {
|
|
|
16854
16900
|
return benchmark;
|
|
16855
16901
|
}
|
|
16856
16902
|
function formatName2(name) {
|
|
16857
|
-
return typeof name === "string" ? name : name
|
|
16903
|
+
return typeof name === "string" ? name : typeof name === "function" ? name.name || "<anonymous>" : String(name);
|
|
16858
16904
|
}
|
|
16859
16905
|
|
|
16860
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16906
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/index.D7Ny8f_s.js
|
|
16861
16907
|
__toESM(require_dist(), 1);
|
|
16862
16908
|
function getRunningMode() {
|
|
16863
16909
|
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
@@ -16868,7 +16914,7 @@ function isWatchMode() {
|
|
|
16868
16914
|
var assertType = function assertType2() {
|
|
16869
16915
|
};
|
|
16870
16916
|
|
|
16871
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16917
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/index.js
|
|
16872
16918
|
var import_expect_type2 = __toESM(require_dist(), 1);
|
|
16873
16919
|
var export_expectTypeOf = import_expect_type2.expectTypeOf;
|
|
16874
16920
|
/*! Bundled license information:
|
|
@@ -191,7 +191,7 @@ function p(n = false) {
|
|
|
191
191
|
var r = process.env.FORCE_TTY !== void 0 || tty.isatty(1);
|
|
192
192
|
var u = p(r);
|
|
193
193
|
|
|
194
|
-
// ../../node_modules/.pnpm/@vitest+pretty-format@3.0.
|
|
194
|
+
// ../../node_modules/.pnpm/@vitest+pretty-format@3.0.9/node_modules/@vitest/pretty-format/dist/index.js
|
|
195
195
|
function _mergeNamespaces$1(n, m3) {
|
|
196
196
|
m3.forEach(function(e) {
|
|
197
197
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k2) {
|
|
@@ -2215,7 +2215,7 @@ function inspect(value, opts = {}) {
|
|
|
2215
2215
|
return options.stylize(String(value), type3);
|
|
2216
2216
|
}
|
|
2217
2217
|
|
|
2218
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
2218
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
2219
2219
|
var {
|
|
2220
2220
|
AsymmetricMatcher,
|
|
2221
2221
|
DOMCollection,
|
|
@@ -2284,6 +2284,9 @@ function format2(...args) {
|
|
|
2284
2284
|
return "-0";
|
|
2285
2285
|
}
|
|
2286
2286
|
if (typeof value === "object" && value !== null) {
|
|
2287
|
+
if (typeof value.toString === "function" && value.toString !== Object.prototype.toString) {
|
|
2288
|
+
return value.toString();
|
|
2289
|
+
}
|
|
2287
2290
|
return inspect2(value, { depth: 0, colors: false });
|
|
2288
2291
|
}
|
|
2289
2292
|
return String(value);
|
|
@@ -2370,7 +2373,7 @@ function getDefaultExportFromCjs2(x2) {
|
|
|
2370
2373
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
2371
2374
|
}
|
|
2372
2375
|
|
|
2373
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
2376
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/helpers.js
|
|
2374
2377
|
function createSimpleStackTrace(options) {
|
|
2375
2378
|
const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
|
|
2376
2379
|
const limit = Error.stackTraceLimit;
|
|
@@ -2586,7 +2589,7 @@ function getSafeTimers() {
|
|
|
2586
2589
|
};
|
|
2587
2590
|
}
|
|
2588
2591
|
|
|
2589
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
2592
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/diff.js
|
|
2590
2593
|
var DIFF_DELETE = -1;
|
|
2591
2594
|
var DIFF_INSERT = 1;
|
|
2592
2595
|
var DIFF_EQUAL = 0;
|
|
@@ -2598,7 +2601,7 @@ var Diff = class {
|
|
|
2598
2601
|
this[1] = text;
|
|
2599
2602
|
}
|
|
2600
2603
|
};
|
|
2601
|
-
|
|
2604
|
+
function diff_commonPrefix(text1, text2) {
|
|
2602
2605
|
if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {
|
|
2603
2606
|
return 0;
|
|
2604
2607
|
}
|
|
@@ -2616,8 +2619,8 @@ var diff_commonPrefix = function(text1, text2) {
|
|
|
2616
2619
|
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
|
2617
2620
|
}
|
|
2618
2621
|
return pointermid;
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2622
|
+
}
|
|
2623
|
+
function diff_commonSuffix(text1, text2) {
|
|
2621
2624
|
if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) {
|
|
2622
2625
|
return 0;
|
|
2623
2626
|
}
|
|
@@ -2635,8 +2638,8 @@ var diff_commonSuffix = function(text1, text2) {
|
|
|
2635
2638
|
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
|
2636
2639
|
}
|
|
2637
2640
|
return pointermid;
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2641
|
+
}
|
|
2642
|
+
function diff_commonOverlap_(text1, text2) {
|
|
2640
2643
|
const text1_length = text1.length;
|
|
2641
2644
|
const text2_length = text2.length;
|
|
2642
2645
|
if (text1_length === 0 || text2_length === 0) {
|
|
@@ -2665,8 +2668,8 @@ var diff_commonOverlap_ = function(text1, text2) {
|
|
|
2665
2668
|
length++;
|
|
2666
2669
|
}
|
|
2667
2670
|
}
|
|
2668
|
-
}
|
|
2669
|
-
|
|
2671
|
+
}
|
|
2672
|
+
function diff_cleanupSemantic(diffs) {
|
|
2670
2673
|
let changes = false;
|
|
2671
2674
|
const equalities = [];
|
|
2672
2675
|
let equalitiesLength = 0;
|
|
@@ -2756,7 +2759,7 @@ var diff_cleanupSemantic = function(diffs) {
|
|
|
2756
2759
|
}
|
|
2757
2760
|
pointer++;
|
|
2758
2761
|
}
|
|
2759
|
-
}
|
|
2762
|
+
}
|
|
2760
2763
|
var nonAlphaNumericRegex_ = /[^a-z0-9]/i;
|
|
2761
2764
|
var whitespaceRegex_ = /\s/;
|
|
2762
2765
|
var linebreakRegex_ = /[\r\n]/;
|
|
@@ -4424,7 +4427,7 @@ function C2(e, t, n) {
|
|
|
4424
4427
|
), x.add(i), i;
|
|
4425
4428
|
}
|
|
4426
4429
|
|
|
4427
|
-
// ../../node_modules/.pnpm/@vitest+spy@3.0.
|
|
4430
|
+
// ../../node_modules/.pnpm/@vitest+spy@3.0.9/node_modules/@vitest/spy/dist/index.js
|
|
4428
4431
|
var mocks = /* @__PURE__ */ new Set();
|
|
4429
4432
|
function isMockFunction(fn2) {
|
|
4430
4433
|
return typeof fn2 === "function" && "_isMockFunction" in fn2 && fn2._isMockFunction;
|
|
@@ -4566,7 +4569,7 @@ function fn(implementation) {
|
|
|
4566
4569
|
return enhancedSpy;
|
|
4567
4570
|
}
|
|
4568
4571
|
|
|
4569
|
-
// ../../node_modules/.pnpm/@vitest+utils@3.0.
|
|
4572
|
+
// ../../node_modules/.pnpm/@vitest+utils@3.0.9/node_modules/@vitest/utils/dist/error.js
|
|
4570
4573
|
var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
4571
4574
|
var IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
4572
4575
|
function isImmutable(v) {
|
|
@@ -8695,7 +8698,7 @@ function use(fn2) {
|
|
|
8695
8698
|
}
|
|
8696
8699
|
__name(use, "use");
|
|
8697
8700
|
|
|
8698
|
-
// ../../node_modules/.pnpm/@vitest+expect@3.0.
|
|
8701
|
+
// ../../node_modules/.pnpm/@vitest+expect@3.0.9/node_modules/@vitest/expect/dist/index.js
|
|
8699
8702
|
var MATCHERS_OBJECT = Symbol.for("matchers-object");
|
|
8700
8703
|
var JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object");
|
|
8701
8704
|
var GLOBAL_EXPECT = Symbol.for("expect-global");
|
|
@@ -9475,7 +9478,7 @@ var Any = class extends AsymmetricMatcher3 {
|
|
|
9475
9478
|
return typeof other == "number" || other instanceof Number;
|
|
9476
9479
|
}
|
|
9477
9480
|
if (this.sample === Function) {
|
|
9478
|
-
return typeof other == "function" || other
|
|
9481
|
+
return typeof other == "function" || typeof other === "function";
|
|
9479
9482
|
}
|
|
9480
9483
|
if (this.sample === Boolean) {
|
|
9481
9484
|
return typeof other == "boolean" || other instanceof Boolean;
|
|
@@ -10150,12 +10153,15 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10150
10153
|
throw new AssertionError2(msg);
|
|
10151
10154
|
}
|
|
10152
10155
|
});
|
|
10156
|
+
function equalsArgumentArray(a3, b) {
|
|
10157
|
+
return a3.length === b.length && a3.every(
|
|
10158
|
+
(aItem, i) => equals(aItem, b[i], [...customTesters, iterableEquality])
|
|
10159
|
+
);
|
|
10160
|
+
}
|
|
10153
10161
|
def(["toHaveBeenCalledWith", "toBeCalledWith"], function(...args) {
|
|
10154
10162
|
const spy = getSpy(this);
|
|
10155
10163
|
const spyName = spy.getMockName();
|
|
10156
|
-
const pass = spy.mock.calls.some(
|
|
10157
|
-
(callArg) => equals(callArg, args, [...customTesters, iterableEquality])
|
|
10158
|
-
);
|
|
10164
|
+
const pass = spy.mock.calls.some((callArg) => equalsArgumentArray(callArg, args));
|
|
10159
10165
|
const isNot = utils.flag(this, "negate");
|
|
10160
10166
|
const msg = utils.getMessage(this, [
|
|
10161
10167
|
pass,
|
|
@@ -10171,9 +10177,7 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10171
10177
|
const spy = getSpy(this);
|
|
10172
10178
|
const spyName = spy.getMockName();
|
|
10173
10179
|
const callCount = spy.mock.calls.length;
|
|
10174
|
-
const hasCallWithArgs = spy.mock.calls.some(
|
|
10175
|
-
(callArg) => equals(callArg, args, [...customTesters, iterableEquality])
|
|
10176
|
-
);
|
|
10180
|
+
const hasCallWithArgs = spy.mock.calls.some((callArg) => equalsArgumentArray(callArg, args));
|
|
10177
10181
|
const pass = hasCallWithArgs && callCount === 1;
|
|
10178
10182
|
const isNot = utils.flag(this, "negate");
|
|
10179
10183
|
const msg = utils.getMessage(this, [
|
|
@@ -10195,7 +10199,7 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10195
10199
|
const callCount = spy.mock.calls.length;
|
|
10196
10200
|
const isCalled = times <= callCount;
|
|
10197
10201
|
this.assert(
|
|
10198
|
-
|
|
10202
|
+
nthCall && equalsArgumentArray(nthCall, args),
|
|
10199
10203
|
`expected ${ordinalOf(
|
|
10200
10204
|
times
|
|
10201
10205
|
)} "${spyName}" call to have been called with #{exp}${isCalled ? `` : `, but called only ${callCount} times`}`,
|
|
@@ -10215,7 +10219,7 @@ var JestChaiExpect = (chai2, utils) => {
|
|
|
10215
10219
|
const spyName = spy.getMockName();
|
|
10216
10220
|
const lastCall = spy.mock.calls[spy.mock.calls.length - 1];
|
|
10217
10221
|
this.assert(
|
|
10218
|
-
|
|
10222
|
+
lastCall && equalsArgumentArray(lastCall, args),
|
|
10219
10223
|
`expected last "${spyName}" call to have been called with #{exp}`,
|
|
10220
10224
|
`expected last "${spyName}" call to not have been called with #{exp}`,
|
|
10221
10225
|
args,
|
|
@@ -11152,7 +11156,7 @@ var isAbsolute2 = function(p3) {
|
|
|
11152
11156
|
return _IS_ABSOLUTE_RE2.test(p3);
|
|
11153
11157
|
};
|
|
11154
11158
|
|
|
11155
|
-
// ../../node_modules/.pnpm/@vitest+runner@3.0.
|
|
11159
|
+
// ../../node_modules/.pnpm/@vitest+runner@3.0.9/node_modules/@vitest/runner/dist/chunk-tasks.js
|
|
11156
11160
|
function createChainable(keys2, fn2) {
|
|
11157
11161
|
function create(context) {
|
|
11158
11162
|
const chain2 = function(...args) {
|
|
@@ -11197,7 +11201,7 @@ function getTestName(task, separator = " > ") {
|
|
|
11197
11201
|
return getNames(task).slice(1).join(separator);
|
|
11198
11202
|
}
|
|
11199
11203
|
|
|
11200
|
-
// ../../node_modules/.pnpm/@vitest+runner@3.0.
|
|
11204
|
+
// ../../node_modules/.pnpm/@vitest+runner@3.0.9/node_modules/@vitest/runner/dist/index.js
|
|
11201
11205
|
var PendingError = class extends Error {
|
|
11202
11206
|
constructor(message, task, note) {
|
|
11203
11207
|
super(message);
|
|
@@ -11222,7 +11226,7 @@ async function runWithSuite(suite2, fn2) {
|
|
|
11222
11226
|
await fn2();
|
|
11223
11227
|
collectorContext.currentSuite = prev;
|
|
11224
11228
|
}
|
|
11225
|
-
function withTimeout(fn2, timeout, isHook = false) {
|
|
11229
|
+
function withTimeout(fn2, timeout, isHook = false, stackTraceError) {
|
|
11226
11230
|
if (timeout <= 0 || timeout === Number.POSITIVE_INFINITY) {
|
|
11227
11231
|
return fn2;
|
|
11228
11232
|
}
|
|
@@ -11233,13 +11237,16 @@ function withTimeout(fn2, timeout, isHook = false) {
|
|
|
11233
11237
|
var _a;
|
|
11234
11238
|
const timer = setTimeout(() => {
|
|
11235
11239
|
clearTimeout(timer);
|
|
11236
|
-
|
|
11240
|
+
rejectTimeoutError();
|
|
11237
11241
|
}, timeout);
|
|
11238
11242
|
(_a = timer.unref) == null ? void 0 : _a.call(timer);
|
|
11243
|
+
function rejectTimeoutError() {
|
|
11244
|
+
reject_(makeTimeoutError(isHook, timeout, stackTraceError));
|
|
11245
|
+
}
|
|
11239
11246
|
function resolve4(result) {
|
|
11240
11247
|
clearTimeout(timer);
|
|
11241
11248
|
if (now$2() - startTime >= timeout) {
|
|
11242
|
-
|
|
11249
|
+
rejectTimeoutError();
|
|
11243
11250
|
return;
|
|
11244
11251
|
}
|
|
11245
11252
|
resolve_(result);
|
|
@@ -11275,20 +11282,25 @@ function createTestContext(test5, runner2) {
|
|
|
11275
11282
|
context.onTestFailed = (handler, timeout) => {
|
|
11276
11283
|
test5.onFailed || (test5.onFailed = []);
|
|
11277
11284
|
test5.onFailed.push(
|
|
11278
|
-
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true)
|
|
11285
|
+
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true, new Error("STACK_TRACE_ERROR"))
|
|
11279
11286
|
);
|
|
11280
11287
|
};
|
|
11281
11288
|
context.onTestFinished = (handler, timeout) => {
|
|
11282
11289
|
test5.onFinished || (test5.onFinished = []);
|
|
11283
11290
|
test5.onFinished.push(
|
|
11284
|
-
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true)
|
|
11291
|
+
withTimeout(handler, timeout ?? runner2.config.hookTimeout, true, new Error("STACK_TRACE_ERROR"))
|
|
11285
11292
|
);
|
|
11286
11293
|
};
|
|
11287
11294
|
return ((_a = runner2.extendTaskContext) == null ? void 0 : _a.call(runner2, context)) || context;
|
|
11288
11295
|
}
|
|
11289
|
-
function
|
|
11290
|
-
|
|
11296
|
+
function makeTimeoutError(isHook, timeout, stackTraceError) {
|
|
11297
|
+
const message = `${isHook ? "Hook" : "Test"} timed out in ${timeout}ms.
|
|
11291
11298
|
If this is a long-running ${isHook ? "hook" : "test"}, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
|
|
11299
|
+
const error = new Error(message);
|
|
11300
|
+
if (stackTraceError == null ? void 0 : stackTraceError.stack) {
|
|
11301
|
+
error.stack = stackTraceError.stack.replace(error.message, stackTraceError.message);
|
|
11302
|
+
}
|
|
11303
|
+
return error;
|
|
11292
11304
|
}
|
|
11293
11305
|
var fnMap = /* @__PURE__ */ new WeakMap();
|
|
11294
11306
|
var fixtureMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -11574,6 +11586,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
11574
11586
|
initSuite();
|
|
11575
11587
|
const task = function(name2 = "", options = {}) {
|
|
11576
11588
|
var _a;
|
|
11589
|
+
const timeout = (options == null ? void 0 : options.timeout) ?? runner.config.testTimeout;
|
|
11577
11590
|
const task2 = {
|
|
11578
11591
|
id: "",
|
|
11579
11592
|
name: name2,
|
|
@@ -11583,6 +11596,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
11583
11596
|
context: void 0,
|
|
11584
11597
|
type: "test",
|
|
11585
11598
|
file: void 0,
|
|
11599
|
+
timeout,
|
|
11586
11600
|
retry: options.retry ?? runner.config.retry,
|
|
11587
11601
|
repeats: options.repeats,
|
|
11588
11602
|
mode: options.only ? "only" : options.skip ? "skip" : options.todo ? "todo" : "run",
|
|
@@ -11604,7 +11618,7 @@ function createSuiteCollector(name, factory = () => {
|
|
|
11604
11618
|
task2,
|
|
11605
11619
|
withTimeout(
|
|
11606
11620
|
withAwaitAsyncAssertions(withFixtures(handler, context), task2),
|
|
11607
|
-
|
|
11621
|
+
timeout
|
|
11608
11622
|
)
|
|
11609
11623
|
);
|
|
11610
11624
|
}
|
|
@@ -11879,7 +11893,7 @@ function createTest(fn2, context) {
|
|
|
11879
11893
|
return createTaskCollector(fn2, context);
|
|
11880
11894
|
}
|
|
11881
11895
|
function formatName(name) {
|
|
11882
|
-
return typeof name === "string" ? name : name
|
|
11896
|
+
return typeof name === "string" ? name : typeof name === "function" ? name.name || "<anonymous>" : String(name);
|
|
11883
11897
|
}
|
|
11884
11898
|
function formatTitle(template, items, idx) {
|
|
11885
11899
|
if (template.includes("%#")) {
|
|
@@ -11947,27 +11961,54 @@ function getDefaultHookTimeout() {
|
|
|
11947
11961
|
return getRunner().config.hookTimeout;
|
|
11948
11962
|
}
|
|
11949
11963
|
var CLEANUP_TIMEOUT_KEY = Symbol.for("VITEST_CLEANUP_TIMEOUT");
|
|
11964
|
+
var CLEANUP_STACK_TRACE_KEY = Symbol.for("VITEST_CLEANUP_STACK_TRACE");
|
|
11950
11965
|
function beforeAll(fn2, timeout = getDefaultHookTimeout()) {
|
|
11951
11966
|
assertTypes(fn2, '"beforeAll" callback', ["function"]);
|
|
11967
|
+
const stackTraceError = new Error("STACK_TRACE_ERROR");
|
|
11952
11968
|
return getCurrentSuite().on(
|
|
11953
11969
|
"beforeAll",
|
|
11954
|
-
Object.assign(
|
|
11970
|
+
Object.assign(
|
|
11971
|
+
withTimeout(
|
|
11972
|
+
fn2,
|
|
11973
|
+
timeout,
|
|
11974
|
+
true,
|
|
11975
|
+
stackTraceError
|
|
11976
|
+
),
|
|
11977
|
+
{
|
|
11978
|
+
[CLEANUP_TIMEOUT_KEY]: timeout,
|
|
11979
|
+
[CLEANUP_STACK_TRACE_KEY]: stackTraceError
|
|
11980
|
+
}
|
|
11981
|
+
)
|
|
11955
11982
|
);
|
|
11956
11983
|
}
|
|
11957
11984
|
function afterAll(fn2, timeout) {
|
|
11958
11985
|
assertTypes(fn2, '"afterAll" callback', ["function"]);
|
|
11959
11986
|
return getCurrentSuite().on(
|
|
11960
11987
|
"afterAll",
|
|
11961
|
-
withTimeout(
|
|
11988
|
+
withTimeout(
|
|
11989
|
+
fn2,
|
|
11990
|
+
timeout ?? getDefaultHookTimeout(),
|
|
11991
|
+
true,
|
|
11992
|
+
new Error("STACK_TRACE_ERROR")
|
|
11993
|
+
)
|
|
11962
11994
|
);
|
|
11963
11995
|
}
|
|
11964
11996
|
function beforeEach(fn2, timeout = getDefaultHookTimeout()) {
|
|
11965
11997
|
assertTypes(fn2, '"beforeEach" callback', ["function"]);
|
|
11998
|
+
const stackTraceError = new Error("STACK_TRACE_ERROR");
|
|
11966
11999
|
return getCurrentSuite().on(
|
|
11967
12000
|
"beforeEach",
|
|
11968
12001
|
Object.assign(
|
|
11969
|
-
withTimeout(
|
|
11970
|
-
|
|
12002
|
+
withTimeout(
|
|
12003
|
+
withFixtures(fn2),
|
|
12004
|
+
timeout ?? getDefaultHookTimeout(),
|
|
12005
|
+
true,
|
|
12006
|
+
stackTraceError
|
|
12007
|
+
),
|
|
12008
|
+
{
|
|
12009
|
+
[CLEANUP_TIMEOUT_KEY]: timeout,
|
|
12010
|
+
[CLEANUP_STACK_TRACE_KEY]: stackTraceError
|
|
12011
|
+
}
|
|
11971
12012
|
)
|
|
11972
12013
|
);
|
|
11973
12014
|
}
|
|
@@ -11975,7 +12016,12 @@ function afterEach(fn2, timeout) {
|
|
|
11975
12016
|
assertTypes(fn2, '"afterEach" callback', ["function"]);
|
|
11976
12017
|
return getCurrentSuite().on(
|
|
11977
12018
|
"afterEach",
|
|
11978
|
-
withTimeout(
|
|
12019
|
+
withTimeout(
|
|
12020
|
+
withFixtures(fn2),
|
|
12021
|
+
timeout ?? getDefaultHookTimeout(),
|
|
12022
|
+
true,
|
|
12023
|
+
new Error("STACK_TRACE_ERROR")
|
|
12024
|
+
)
|
|
11979
12025
|
);
|
|
11980
12026
|
}
|
|
11981
12027
|
var onTestFailed = createTestHook(
|
|
@@ -11993,7 +12039,7 @@ function createTestHook(name, handler) {
|
|
|
11993
12039
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
11994
12040
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
11995
12041
|
|
|
11996
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
12042
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js
|
|
11997
12043
|
var NAME_WORKER_STATE = "__vitest_worker__";
|
|
11998
12044
|
function getWorkerState() {
|
|
11999
12045
|
const workerState = globalThis[NAME_WORKER_STATE];
|
|
@@ -12053,13 +12099,13 @@ async function waitForImportsToResolve() {
|
|
|
12053
12099
|
await waitForImportsToResolve();
|
|
12054
12100
|
}
|
|
12055
12101
|
|
|
12056
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
12102
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
|
|
12057
12103
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
12058
12104
|
function getDefaultExportFromCjs3(x2) {
|
|
12059
12105
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
12060
12106
|
}
|
|
12061
12107
|
|
|
12062
|
-
// ../../node_modules/.pnpm/@vitest+snapshot@3.0.
|
|
12108
|
+
// ../../node_modules/.pnpm/@vitest+snapshot@3.0.9/node_modules/@vitest/snapshot/dist/index.js
|
|
12063
12109
|
var comma2 = ",".charCodeAt(0);
|
|
12064
12110
|
var chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
12065
12111
|
var intToChar2 = new Uint8Array(64);
|
|
@@ -13786,7 +13832,7 @@ var SnapshotClient = class {
|
|
|
13786
13832
|
}
|
|
13787
13833
|
};
|
|
13788
13834
|
|
|
13789
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
13835
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
|
|
13790
13836
|
var RealDate = Date;
|
|
13791
13837
|
var now2 = null;
|
|
13792
13838
|
var MockDate = class _MockDate extends RealDate {
|
|
@@ -13839,7 +13885,7 @@ function resetDate() {
|
|
|
13839
13885
|
globalThis.Date = RealDate;
|
|
13840
13886
|
}
|
|
13841
13887
|
|
|
13842
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
13888
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/vi.nSCvwQ7l.js
|
|
13843
13889
|
var unsupported = [
|
|
13844
13890
|
// .poll is meant to retry matchers until they succeed, and
|
|
13845
13891
|
// snapshots will always succeed as long as the poll method doesn't throw an error
|
|
@@ -13919,7 +13965,7 @@ function createExpectPoll(expect2) {
|
|
|
13919
13965
|
const rejectWithCause = (cause) => {
|
|
13920
13966
|
reject(
|
|
13921
13967
|
copyStackTrace$1(
|
|
13922
|
-
new Error(
|
|
13968
|
+
new Error("Matcher did not succeed in time.", {
|
|
13923
13969
|
cause
|
|
13924
13970
|
}),
|
|
13925
13971
|
STACK_TRACE_ERROR
|
|
@@ -16220,9 +16266,9 @@ var FakeTimers = class {
|
|
|
16220
16266
|
// | _fakingTime | _fakingDate |
|
|
16221
16267
|
// +-------------+-------------+
|
|
16222
16268
|
// | false | falsy | initial
|
|
16223
|
-
// | false |
|
|
16269
|
+
// | false | truthy | vi.setSystemTime called first (for mocking only Date without fake timers)
|
|
16224
16270
|
// | true | falsy | vi.useFakeTimers called first
|
|
16225
|
-
// | true |
|
|
16271
|
+
// | true | truthy | unreachable
|
|
16226
16272
|
_fakingTime;
|
|
16227
16273
|
_fakingDate;
|
|
16228
16274
|
_fakeTimers;
|
|
@@ -16807,7 +16853,7 @@ function getImporter(name) {
|
|
|
16807
16853
|
return stack?.file || "";
|
|
16808
16854
|
}
|
|
16809
16855
|
|
|
16810
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16856
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/run-once.2ogXb3JV.js
|
|
16811
16857
|
var filesCount = /* @__PURE__ */ new Map();
|
|
16812
16858
|
var cache = /* @__PURE__ */ new Map();
|
|
16813
16859
|
function runOnce(fn2, key) {
|
|
@@ -16830,7 +16876,7 @@ function isFirstRun() {
|
|
|
16830
16876
|
return firstRun;
|
|
16831
16877
|
}
|
|
16832
16878
|
|
|
16833
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16879
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/benchmark.DL72EVN-.js
|
|
16834
16880
|
var benchFns = /* @__PURE__ */ new WeakMap();
|
|
16835
16881
|
var benchOptsMap = /* @__PURE__ */ new WeakMap();
|
|
16836
16882
|
var bench = createBenchmark(function(name, fn2 = noop, options = {}) {
|
|
@@ -16856,10 +16902,10 @@ function createBenchmark(fn2) {
|
|
|
16856
16902
|
return benchmark;
|
|
16857
16903
|
}
|
|
16858
16904
|
function formatName2(name) {
|
|
16859
|
-
return typeof name === "string" ? name : name
|
|
16905
|
+
return typeof name === "string" ? name : typeof name === "function" ? name.name || "<anonymous>" : String(name);
|
|
16860
16906
|
}
|
|
16861
16907
|
|
|
16862
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16908
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/chunks/index.D7Ny8f_s.js
|
|
16863
16909
|
chunkCVPOREIE_cjs.__toESM(require_dist(), 1);
|
|
16864
16910
|
function getRunningMode() {
|
|
16865
16911
|
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
@@ -16870,7 +16916,7 @@ function isWatchMode() {
|
|
|
16870
16916
|
var assertType = function assertType2() {
|
|
16871
16917
|
};
|
|
16872
16918
|
|
|
16873
|
-
// ../../node_modules/.pnpm/vitest@3.0.
|
|
16919
|
+
// ../../node_modules/.pnpm/vitest@3.0.9_@edge-runtime+vm@3.2.0_@types+debug@4.1.12_@types+node@20.17.27_jiti@2.4.2_fba271a0d30305ced4bdaac96dafc94e/node_modules/vitest/dist/index.js
|
|
16874
16920
|
var import_expect_type2 = chunkCVPOREIE_cjs.__toESM(require_dist(), 1);
|
|
16875
16921
|
var export_expectTypeOf = import_expect_type2.expectTypeOf;
|
|
16876
16922
|
/*! Bundled license information:
|
package/dist/index.cjs
CHANGED
|
@@ -41,7 +41,7 @@ var getCurrentTestInfo = async () => {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
try {
|
|
44
|
-
const vitest = await import('./dist-
|
|
44
|
+
const vitest = await import('./dist-YYZ4VIXB.cjs');
|
|
45
45
|
if (typeof vitest !== "undefined" && vitest.expect?.getState) {
|
|
46
46
|
const state = vitest.expect.getState();
|
|
47
47
|
return {
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var getCurrentTestInfo = async () => {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
try {
|
|
42
|
-
const vitest = await import('./dist-
|
|
42
|
+
const vitest = await import('./dist-JZDLUHSB.js');
|
|
43
43
|
if (typeof vitest !== "undefined" && vitest.expect?.getState) {
|
|
44
44
|
const state = vitest.expect.getState();
|
|
45
45
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/evals",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"sentiment": "^5.0.2",
|
|
63
63
|
"string-similarity": "^4.0.4",
|
|
64
64
|
"zod": "^3.24.2",
|
|
65
|
-
"@mastra/core": "^0.
|
|
65
|
+
"@mastra/core": "^0.7.0-alpha.1"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"ai": "^4.0.0"
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"@types/string-similarity": "^4.0.2",
|
|
77
77
|
"ai": "^4.1.54",
|
|
78
78
|
"dotenv": "^16.4.7",
|
|
79
|
-
"eslint": "^9.
|
|
79
|
+
"eslint": "^9.23.0",
|
|
80
80
|
"tsup": "^8.4.0",
|
|
81
81
|
"typescript": "^5.8.2",
|
|
82
|
-
"vitest": "^3.0.
|
|
82
|
+
"vitest": "^3.0.9",
|
|
83
83
|
"@internal/lint": "0.0.1"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|