fix: resolve CI type failures in boot and immersion query tests

This commit is contained in:
2026-03-28 00:07:11 -07:00
parent 8e5cb5f885
commit 8f6877db12
2 changed files with 34 additions and 5 deletions

View File

@@ -793,8 +793,12 @@ test('getTrendsDashboard month grouping spans every touched calendar month and k
const RealDate = Date;
class MockDate extends Date {
constructor(...args: ConstructorParameters<typeof Date>) {
super(...(args.length === 0 ? [new RealDate(2026, 2, 1, 12, 0, 0).getTime()] : args));
constructor(...args: any[]) {
if (args.length === 0) {
super(new RealDate(2026, 2, 1, 12, 0, 0).getTime());
} else {
super(...args);
}
}
static override now(): number {
@@ -1065,8 +1069,12 @@ test('getQueryHints computes weekly new-word cutoff from calendar midnights', ()
const RealDate = Date;
class MockDate extends Date {
constructor(...args: ConstructorParameters<typeof Date>) {
super(...(args.length === 0 ? [new RealDate(2026, 2, 15, 12, 0, 0).getTime()] : args));
constructor(...args: any[]) {
if (args.length === 0) {
super(new RealDate(2026, 2, 15, 12, 0, 0).getTime());
} else {
super(...args);
}
}
static override now(): number {