test: Add nodeFetch back

This commit is contained in:
Ondrej Ezr 2024-07-18 15:00:23 +02:00 committed by Klara Simickova
parent 69b7c574ae
commit df993c7fc2
2 changed files with 10 additions and 7 deletions

View file

@ -1,10 +1,10 @@
import { configure } from '@testing-library/react';
// import nodeFetch, { Request, Response } from 'node-fetch';
import nodeFetch, { Request, Response } from 'node-fetch';
import { server } from './mocks/server';
import 'vitest-canvas-mock';
// Object.assign(global, { fetch: nodeFetch, Request, Response });
Object.assign(global, { fetch: nodeFetch, Request, Response });
// scrollTo is not defined in jsdom - needed for the navigation to the wizard
window.HTMLElement.prototype.scrollTo = function () {};