diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8dd053..7449b09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - node-version: [16.x, 17.x, 18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x cache: 'npm' registry-url: 'https://registry.npmjs.org' - run: npm ci diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 33bc2c1..747b940 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,7 +31,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x cache: 'npm' - run: npm ci - name: Build diff --git a/package.json b/package.json index 26add66..6a87bc7 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,5 @@ "node-fetch": "^2.6.7", "path-to-regexp": "^6.2.1" }, - "jest": { - "globalSetup": "./tests/globalSetup.js" - } + "jest": {} } diff --git a/tests/globalSetup.js b/tests/globalSetup.js deleted file mode 100644 index 3c20991..0000000 --- a/tests/globalSetup.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * In Node 16 and 17, Fetch API is not available globally, - * which is required to run Next.js unit tests. - * - * To circumvent this, we export manually the versions from node-fetch. - */ -module.exports = async (_globalConfig, _projectConfig) => { - // eslint-disable-next-line global-require - const { Headers, Request, Response } = require('node-fetch'); - globalThis.Headers = Headers; - globalThis.Request = Request; - globalThis.Response = Response; -};