Skip to content

Commit

Permalink
test: remove fetch polyfill for node
Browse files Browse the repository at this point in the history
  • Loading branch information
nandi95 committed Apr 12, 2024
1 parent ca26449 commit e9892c2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 62 deletions.
52 changes: 0 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
"@typescript-eslint/parser": "^7.6.0",
"commitlint": "^19.2.1",
"conventional-changelog-conventionalcommits": "7.0.2",
"cross-fetch": "^4.0.0",
"eslint": "^8.23.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^28.2.0",
Expand Down
9 changes: 0 additions & 9 deletions tests/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import GlobalConfig from '../src/Support/GlobalConfig';
import type Configuration from '../src/Contracts/Configuration';
import { beforeEach, jest } from '@jest/globals';
// for some reason global.Promise not found when referenced within node-fetch
global.Promise = globalThis.Promise;
// eslint-disable-next-line @typescript-eslint/no-redeclare
import fetch, { Response, Headers, Request } from 'cross-fetch';

globalThis.fetch = fetch;
globalThis.Response = Response;
globalThis.Headers = Headers;
globalThis.Request = Request;

/* eslint-disable-next-line @typescript-eslint/consistent-generic-constructors */
export const config: GlobalConfig<Configuration> = new GlobalConfig;
Expand Down

0 comments on commit e9892c2

Please sign in to comment.