@@ -7,7 +7,7 @@ describe('Client $diagnostics tests', () => {
77 it ( 'returns zod cache stats' , async ( ) => {
88 const client = await createTestClient ( schema ) ;
99 try {
10- const diagnostics = await client . $diagnostics ( ) ;
10+ const diagnostics = await client . $diagnostics ;
1111 expect ( diagnostics . zodCache ) . toEqual ( { size : 0 , keys : [ ] } ) ;
1212 } finally {
1313 await client . $disconnect ( ) ;
@@ -18,7 +18,7 @@ describe('Client $diagnostics tests', () => {
1818 const client = await createTestClient ( schema ) ;
1919 try {
2020 await client . user . create ( { data : { email : 'u1@test.com' } } ) ;
21- const diagnostics = await client . $diagnostics ( ) ;
21+ const diagnostics = await client . $diagnostics ;
2222 expect ( diagnostics . zodCache . size ) . toBeGreaterThan ( 0 ) ;
2323 expect ( diagnostics . zodCache . keys . length ) . toBe ( diagnostics . zodCache . size ) ;
2424 } finally {
@@ -31,7 +31,7 @@ describe('Client $diagnostics tests', () => {
3131 try {
3232 await client . user . create ( { data : { email : 'u1@test.com' } } ) ;
3333 await client . user . findMany ( ) ;
34- const diagnostics = await client . $diagnostics ( ) ;
34+ const diagnostics = await client . $diagnostics ;
3535 expect ( diagnostics . slowQueries ) . toEqual ( [ ] ) ;
3636 } finally {
3737 await client . $disconnect ( ) ;
@@ -48,7 +48,7 @@ describe('Client $diagnostics tests', () => {
4848 await client . user . create ( { data : { email : 'u1@test.com' } } ) ;
4949 await client . user . findMany ( ) ;
5050
51- const diagnostics = await client . $diagnostics ( ) ;
51+ const diagnostics = await client . $diagnostics ;
5252 expect ( diagnostics . slowQueries . length ) . toBeGreaterThan ( 0 ) ;
5353 for ( const query of diagnostics . slowQueries ) {
5454 expect ( query . startedAt ) . toBeInstanceOf ( Date ) ;
@@ -68,7 +68,7 @@ describe('Client $diagnostics tests', () => {
6868 await client . user . create ( { data : { email : 'u1@test.com' } } ) ;
6969 await client . user . findMany ( ) ;
7070
71- const diagnostics = await client . $diagnostics ( ) ;
71+ const diagnostics = await client . $diagnostics ;
7272 expect ( diagnostics . slowQueries ) . toEqual ( [ ] ) ;
7373 } finally {
7474 await client . $disconnect ( ) ;
@@ -82,8 +82,8 @@ describe('Client $diagnostics tests', () => {
8282 try {
8383 await client . user . create ( { data : { email : 'u1@test.com' } } ) ;
8484
85- const diagnostics1 = await client . $diagnostics ( ) ;
86- const diagnostics2 = await client . $diagnostics ( ) ;
85+ const diagnostics1 = await client . $diagnostics ;
86+ const diagnostics2 = await client . $diagnostics ;
8787 expect ( diagnostics1 . slowQueries ) . not . toBe ( diagnostics2 . slowQueries ) ;
8888 expect ( diagnostics1 . slowQueries ) . toEqual ( diagnostics2 . slowQueries ) ;
8989 } finally {
@@ -102,8 +102,8 @@ describe('Client $diagnostics tests', () => {
102102 await derivedClient . user . findMany ( ) ;
103103
104104 // both clients should see the same slow queries
105- const parentDiag = await client . $diagnostics ( ) ;
106- const derivedDiag = await derivedClient . $diagnostics ( ) ;
105+ const parentDiag = await client . $diagnostics ;
106+ const derivedDiag = await derivedClient . $diagnostics ;
107107 expect ( parentDiag . slowQueries ) . toEqual ( derivedDiag . slowQueries ) ;
108108 } finally {
109109 await client . $disconnect ( ) ;
@@ -119,7 +119,7 @@ describe('Client $diagnostics tests', () => {
119119 await tx . user . create ( { data : { email : 'u1@test.com' } } ) ;
120120 } ) ;
121121
122- const diagnostics = await client . $diagnostics ( ) ;
122+ const diagnostics = await client . $diagnostics ;
123123 expect ( diagnostics . slowQueries . length ) . toBeGreaterThan ( 0 ) ;
124124 } finally {
125125 await client . $disconnect ( ) ;
@@ -141,7 +141,7 @@ describe('Client $diagnostics tests', () => {
141141 await client . user . create ( { data : { email : `u${ i } @test.com` } } ) ;
142142 }
143143
144- const diagnostics = await client . $diagnostics ( ) ;
144+ const diagnostics = await client . $diagnostics ;
145145 expect ( diagnostics . slowQueries . length ) . toBeLessThanOrEqual ( maxRecords ) ;
146146 } finally {
147147 await client . $disconnect ( ) ;
@@ -160,7 +160,7 @@ describe('Client $diagnostics tests', () => {
160160 await client . user . create ( { data : { email : `u${ i } @test.com` } } ) ;
161161 }
162162
163- const diagnostics = await client . $diagnostics ( ) ;
163+ const diagnostics = await client . $diagnostics ;
164164 expect ( diagnostics . slowQueries . length ) . toBeGreaterThanOrEqual ( 5 ) ;
165165 } finally {
166166 await client . $disconnect ( ) ;
@@ -180,7 +180,7 @@ describe('Client $diagnostics tests', () => {
180180 await client . user . create ( { data : { email : `u${ i } @test.com` } } ) ;
181181 }
182182
183- const diagnostics = await client . $diagnostics ( ) ;
183+ const diagnostics = await client . $diagnostics ;
184184 expect ( diagnostics . slowQueries . length ) . toBeLessThanOrEqual ( maxRecords ) ;
185185 for ( const query of diagnostics . slowQueries ) {
186186 expect ( query . startedAt ) . toBeInstanceOf ( Date ) ;
0 commit comments