Skip to content

Commit 035f539

Browse files
committed
fix tsc
1 parent d6ebd15 commit 035f539

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

contesto/src/lib/interpreter-tool.test.ts

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ describe('createInterpreterTool', () => {
1919
const sum = a + b
2020
console.log('sum =', sum)
2121
return sum
22-
`
22+
`,
23+
timeout: 5000
2324
}, {} as any) as string
2425
const executionTime = Date.now() - startTime
2526

@@ -42,7 +43,8 @@ describe('createInterpreterTool', () => {
4243
console.log('Before error')
4344
throw new Error('Test error')
4445
console.log('After error')
45-
`
46+
`,
47+
timeout: 5000
4648
}, {} as any) as string
4749

4850
expect(result).toContain('Test error')
@@ -59,7 +61,8 @@ describe('createInterpreterTool', () => {
5961
const obj = { name: 'test', value: 42, nested: { key: 'value' } }
6062
console.log('Object:', obj)
6163
console.log('Array:', [1, 2, 3])
62-
`
64+
`,
65+
timeout: 5000
6366
}, {} as any) as string
6467

6568
expect(result).toMatchInlineSnapshot(`
@@ -107,7 +110,8 @@ describe('createInterpreterTool', () => {
107110
const value = await promise
108111
console.log('Promise value:', value)
109112
return 'done'
110-
`
113+
`,
114+
timeout: 5000
111115
}, {} as any) as string
112116

113117
expect(result).toMatchInlineSnapshot(`
@@ -147,7 +151,8 @@ describe('createInterpreterTool', () => {
147151
const b = 10
148152
const sum = a + b
149153
return sum
150-
`
154+
`,
155+
timeout: 5000
151156
}, {} as any) as string
152157

153158
expect(result).toBe('no console logs')
@@ -171,7 +176,8 @@ describe('createInterpreterTool', () => {
171176
}
172177
173178
main()
174-
`
179+
`,
180+
timeout: 5000
175181
}, {} as any) as string
176182

177183
expect(result).toMatchInlineSnapshot(`
@@ -230,7 +236,8 @@ describe('createInterpreterTool', () => {
230236
console.log('Greeting:', greeting)
231237
232238
console.log('Done')
233-
`
239+
`,
240+
timeout: 5000
234241
}, {} as any) as string
235242

236243
expect(result).toMatchInlineSnapshot(`
@@ -267,7 +274,8 @@ describe('createInterpreterTool', () => {
267274
} catch (error) {
268275
console.log('Error caught:', error.message)
269276
}
270-
`
277+
`,
278+
timeout: 5000
271279
}, {} as any) as string
272280

273281
expect(result).toContain('Invalid input for tool multiply')
@@ -294,7 +302,8 @@ describe('createInterpreterTool', () => {
294302
console.timeEnd('myTimer')
295303
296304
console.log('Sum calculated:', sum)
297-
`
305+
`,
306+
timeout: 5000
298307
}, {} as any) as string
299308

300309
expect(result).toMatch(/This is log/)
@@ -328,7 +337,8 @@ describe('createInterpreterTool', () => {
328337
code: `
329338
console.log('Tools available:', Object.keys(tools))
330339
console.log('No tools should be available')
331-
`
340+
`,
341+
timeout: 5000
332342
}, {} as any) as string
333343

334344
expect(result).toMatchInlineSnapshot(`
@@ -437,7 +447,8 @@ describe('createInterpreterTool', () => {
437447
438448
const relative = new URL('/api/users', 'https://api.example.com')
439449
console.log('Full URL:', relative.href)
440-
`
450+
`,
451+
timeout: 5000
441452
}, {} as any) as string
442453

443454
expect(result).toMatchInlineSnapshot(`
@@ -556,7 +567,8 @@ describe('createInterpreterTool', () => {
556567
})
557568
558569
console.log('User 1 file:', userFile.substring(0, 20) + '...')
559-
`
570+
`,
571+
timeout: 5000
560572
}, {} as any) as string
561573

562574
expect(result).toMatchInlineSnapshot(`

docs-website/src/routes/_catchall-$-client.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,14 @@ import {
2828
PageTOCItems,
2929
PageTOCPopoverItems,
3030
PageTOCTitle,
31-
} from 'fumadocs-ui/layouts/docs/page'
32-
import {
3331
PageBreadcrumb,
3432
PageFooter,
3533
PageLastUpdate,
3634
PageTOC,
3735
PageTOCPopover,
3836
PageTOCPopoverContent,
3937
PageTOCPopoverTrigger,
40-
} from 'fumadocs-ui/layouts/docs/page-client'
38+
} from 'fumadocs-ui/layouts/docs/page'
4139
import {
4240
ExternalLinkIcon,
4341
GithubIcon,

0 commit comments

Comments
 (0)