Skip to content

Commit 838bf8d

Browse files
committed
test(ts-sdk): use a typed Response in the default-host test
1 parent 38ac654 commit 838bf8d

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎packages/ts-sdk/src/index.test.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,9 @@ describe('client identity', () => {
249249
it('sends requests to the canonical www host when no baseUrl is given', async () => {
250250
const client = new SimStudioClient({ apiKey: 'test-api-key' })
251251
vi.mocked(mockFetch).mockClear()
252-
vi.mocked(mockFetch).mockResolvedValue({
253-
ok: true,
254-
status: 200,
255-
headers: { get: () => null },
256-
json: async () => ({ data: { isDeployed: true } }),
257-
} as any)
252+
vi.mocked(mockFetch).mockResolvedValue(
253+
new Response(JSON.stringify({ data: { isDeployed: true } }), { status: 200 })
254+
)
258255

259256
await client.getWorkflowStatus('workflow-id')
260257

0 commit comments

Comments
 (0)