chore: upgrade vitest 3.2.4 → 4.0.18
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 18m42s
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 18m42s
Breaking changes addressed: - vi.fn() mock factories: arrow → regular functions for constructor support - Exclude dist/ from test resolution (vitest 4 simplified defaults) - 672 tests pass, 0 tsc errors
This commit is contained in:
parent
7fffd404e9
commit
55172856b1
5 changed files with 116 additions and 348 deletions
|
|
@ -26,7 +26,7 @@ vi.mock("stripe", () => {
|
|||
retrieve: vi.fn(),
|
||||
},
|
||||
};
|
||||
return { default: vi.fn(() => mockStripe), __mockStripe: mockStripe };
|
||||
return { default: vi.fn(function() { return mockStripe; }), __mockStripe: mockStripe };
|
||||
});
|
||||
|
||||
let app: express.Express;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,12 @@ const mockQuery = vi.fn();
|
|||
const mockConnect = vi.fn();
|
||||
|
||||
vi.mock("pg", () => {
|
||||
const Pool = vi.fn(() => ({
|
||||
connect: mockConnect,
|
||||
on: vi.fn(),
|
||||
}));
|
||||
const Pool = vi.fn(function() {
|
||||
return {
|
||||
connect: mockConnect,
|
||||
on: vi.fn(),
|
||||
};
|
||||
});
|
||||
return { default: { Pool }, Pool };
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue