We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56764cc commit 93ada18Copy full SHA for 93ada18
tests/sdk/utils.ts
@@ -24,8 +24,8 @@ export const fetch = vi.fn((url: string, options?: RequestInit) => {
24
if (!headers) throw new Error('missing request headers')
25
const env = headers['X-Environment-Key'];
26
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')) {
+ if (url.includes('/environment-document')) {
+ if (env.startsWith('ser.')) {
29
return Promise.resolve(new Response(environmentJSON, { status: 200 }))
30
}
31
return Promise.resolve(new Response('environment-document called without a server-side key', { status: 401 }))
0 commit comments