Skip to content

Commit

Permalink
update vitest
Browse files Browse the repository at this point in the history
fix toSatisfy type bug, c.f. vitest-dev/vitest#7273
  • Loading branch information
QuentinRoy committed Jan 18, 2025
1 parent 691fa85 commit 538efe0
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 67 deletions.
6 changes: 0 additions & 6 deletions packages/log-server/__tests__/sqlite-store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,14 @@ describe('SQLiteStore#addRun', () => {
it('should create runs with different ids', async ({ expect }) => {
await expect(
store.addRun({ runName: 'run1', experimentName: 'experiment1' }),
// @ts-expect-error This is a bug in vitest types
).resolves.toSatisfy(isAddRunResult);
await expect(
store.addRun({ runName: 'run2', experimentName: 'experiment1' }),
// @ts-expect-error This is a bug in vitest types
).resolves.toSatisfy(isAddRunResult);
await expect(
store.addRun({ runName: 'run3', experimentName: 'experiment2' }),
// @ts-expect-error This is a bug in vitest types
).resolves.toSatisfy(isAddRunResult);
expect(addRunSpy).toHaveBeenCalledTimes(3);
// @ts-expect-error This is a bug in vitest types
await expect(Promise.all(addRunSpy.mock.results)).resolves.toSatisfy(
(runIds: unknown): boolean => Array.isArray(runIds) && allUnique(runIds),
);
Expand All @@ -92,11 +88,9 @@ describe('SQLiteStore#addRun', () => {
}) => {
await expect(
store.addRun({ runName: 'run-id', experimentName: 'experiment1' }),
// @ts-expect-error This is a bug in vitest types
).resolves.toSatisfy(isAddRunResult);
await expect(
store.addRun({ runName: 'run-id', experimentName: 'experiment2' }),
// @ts-expect-error This is a bug in vitest types
).resolves.toSatisfy(isAddRunResult);
});
});
Expand Down
120 changes: 60 additions & 60 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ catalog:
'cross-env': '^7.0.3'
'vite': '^6.0.7'
# Pin vitest version because testing types is experimental.
'vitest': '3.0.1'
'vitest': '3.0.2'
'tsx': '^4.7.0'

0 comments on commit 538efe0

Please sign in to comment.