Skip to content

Commit c2401e9

Browse files
committed
Remove options test
1 parent 0f330d5 commit c2401e9

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

packages/gitbook/tests/embed.test.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,4 @@ describe('embed script', () => {
2121
const body = await response.text();
2222
expect(body).toContain('w.GitBook');
2323
});
24-
25-
it('responds to OPTIONS requests with CORS headers for cross-domain insertion', async () => {
26-
const response = await fetch(EMBED_SCRIPT_URL, {
27-
method: 'OPTIONS',
28-
headers: {
29-
Origin: 'https://example.com',
30-
'Access-Control-Request-Method': 'GET',
31-
},
32-
});
33-
34-
expect(response.status).toBe(204);
35-
expect(response.headers.get('access-control-allow-origin')).toBe('*');
36-
expect(response.headers.get('access-control-allow-methods')).toContain('GET');
37-
});
3824
});

0 commit comments

Comments
 (0)