1- import { test } from 'vitest' ;
1+ import { expect , test } from 'vitest' ;
22import { zeroForTest } from '@rocicorp/zero/testing' ;
33import { builder , schema } from '../shared/schema.ts' ;
44import { mutators } from '../shared/mutators.ts' ;
@@ -34,6 +34,7 @@ test('local mutate', async () => {
3434 schema,
3535 mutators : mutatorsForTest ,
3636 userID : 'user-1' ,
37+ // oxlint-disable-next-line no-explicit-any
3738 context : { sub : 'user-1' , role : 'user' } as any ,
3839 } ) ;
3940
@@ -46,7 +47,7 @@ test('local mutate', async () => {
4647 } ) ,
4748 ) . client ;
4849
49- const result = await zero . mutate (
50+ await zero . mutate (
5051 mutatorsForTest . issue . create ( {
5152 id : 'issue-1' ,
5253 title : 'Test Issue' ,
@@ -57,9 +58,24 @@ test('local mutate', async () => {
5758 } ) ,
5859 ) . client ;
5960
60- console . log ( 'Result:' , result ) ;
61-
6261 const issues = await zero . run ( builder . issue ) ;
6362
64- console . log ( 'Issues:' , issues ) ;
63+ expect ( issues ) . toMatchInlineSnapshot ( `
64+ [
65+ {
66+ "assigneeID": null,
67+ "created": 1768845460229,
68+ "creatorID": "user-1",
69+ "description": "This is a test issue",
70+ "id": "issue-1",
71+ "modified": 1768845460229,
72+ "open": true,
73+ "projectID": "project-1",
74+ "shortID": null,
75+ "title": "Test Issue",
76+ "visibility": "public",
77+ Symbol(rc): 1,
78+ },
79+ ]
80+ ` ) ;
6581} ) ;
0 commit comments