catalog-backend-module-github: work around lack of msw fetch support in Node 18
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -25,6 +25,11 @@ import {
|
||||
getOrganizationRepositories,
|
||||
QueryResponse,
|
||||
} from './github';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
// Workaround for Node.js 18, where native fetch is available, but not yet picked up by msw
|
||||
// TODO(Rugvip): remove once https://github.com/mswjs/msw/issues/1388 is resolved
|
||||
(global as any).fetch = fetch;
|
||||
|
||||
describe('github', () => {
|
||||
const server = setupServer();
|
||||
|
||||
Reference in New Issue
Block a user