Skip to content

Commit f6fcaf6

Browse files
committed
fix: remove node-fetch dependency from test setup
Remove unnecessary node-fetch polyfill from globalSetup.js as fetch is already available in the jsdom environment. This fixes the "Cannot find module 'node-fetch'" error in tests. Modern versions of jsdom include fetch support, making the polyfill redundant and causing import errors when the package isn't installed.
1 parent 804cd62 commit f6fcaf6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/frontend/utils/globalSetup.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ const { TextEncoder, TextDecoder } = require('util');
77
global.TextEncoder = TextEncoder;
88
global.TextDecoder = TextDecoder;
99

10-
// Set up fetch polyfill
11-
global.fetch = require('node-fetch');
10+
// Fetch is already available in jsdom environment, no polyfill needed
1211

1312
// Mock window.location
1413
delete window.location;

0 commit comments

Comments
 (0)