Skip to content

Commit 93ada18

Browse files
Update tests/sdk/utils.ts
Co-authored-by: Matthew Elwell <[email protected]>
1 parent 56764cc commit 93ada18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/sdk/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const fetch = vi.fn((url: string, options?: RequestInit) => {
2424
if (!headers) throw new Error('missing request headers')
2525
const env = headers['X-Environment-Key'];
2626
if (!env) return Promise.resolve(new Response('missing x-environment-key header', { status: 404 }));
27-
if (env.startsWith('ser.')) {
28-
if (url.includes('/environment-document')) {
27+
if (url.includes('/environment-document')) {
28+
if (env.startsWith('ser.')) {
2929
return Promise.resolve(new Response(environmentJSON, { status: 200 }))
3030
}
3131
return Promise.resolve(new Response('environment-document called without a server-side key', { status: 401 }))

0 commit comments

Comments
 (0)