Skip to content

Commit 8eb2d6d

Browse files
committed
updated tests
1 parent 700855e commit 8eb2d6d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/sim/app/api/chat/route.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,21 @@ describe('Chat API Route', () => {
270270
}),
271271
}))
272272

273+
// Mock the env module to ensure NODE_ENV is development
274+
vi.doMock('@/lib/env', () => ({
275+
env: {
276+
NODE_ENV: 'development',
277+
NEXT_PUBLIC_APP_URL: 'http://localhost:3000',
278+
},
279+
}))
280+
273281
// Mock environment variables
274282
vi.stubGlobal('process', {
275283
...process,
276284
env: {
277-
...env,
285+
...process.env,
278286
NODE_ENV: 'development',
287+
NEXT_PUBLIC_APP_URL: 'http://localhost:3000',
279288
},
280289
})
281290

0 commit comments

Comments
 (0)