Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions e2e/dom/fixtures/test/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ test('should get window property correctly', async () => {
test('should get global property correctly', async () => {
expect(global.URL).toBeDefined();
});

test('should support fetch', async () => {
await expect(
fetch(new URL('/404', location.href), {
signal: AbortSignal.timeout(0),
}),
).rejects.toHaveProperty('name', 'TimeoutError');
});
12 changes: 7 additions & 5 deletions packages/core/src/runtime/worker/env/jsdomKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// SEE https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/interfaces.js
const LIVING_KEYS = [
'DOMException',
'URL',
'URLSearchParams',
'EventTarget',

'NamedNodeMap',
Expand Down Expand Up @@ -185,9 +183,6 @@ const LIVING_KEYS = [
'ShadowRoot',
'MutationObserver',
'MutationRecord',
'Headers',
'AbortController',
'AbortSignal',

'Uint8Array',
'Uint16Array',
Expand All @@ -210,6 +205,13 @@ const LIVING_KEYS = [
'Option',

'CSS',

// Conflict with Node.js values
// 'Headers',
// 'AbortController',
// 'AbortSignal',
// 'URL',
// 'URLSearchParams',
];

const OTHER_KEYS = [
Expand Down
Loading