diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5fdd61b..6d53a25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ on: jobs: test: name: Test - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest defaults: run: working-directory: test @@ -23,7 +23,7 @@ jobs: submodules: true - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: lts/* - run: npm install - run: npm test env: diff --git a/test/blog.mjs b/test/blog.mjs index 550eecd..e81362d 100644 --- a/test/blog.mjs +++ b/test/blog.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; describe('blog', function() { // regression test for https://github.com/whatwg/meta/issues/59 diff --git a/test/build.mjs b/test/build.mjs index 1778a04..ac9d7a8 100644 --- a/test/build.mjs +++ b/test/build.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; describe('build', function() { specify('/version', async function() { diff --git a/test/caching.mjs b/test/caching.mjs index ef356a6..fa49e9b 100644 --- a/test/caching.mjs +++ b/test/caching.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; const CACHE_TESTS = [ 'https://html.spec.whatwg.org/fonts/Essays1743.ttf', diff --git a/test/content-type.mjs b/test/content-type.mjs index 2c74d57..9b0b3de 100644 --- a/test/content-type.mjs +++ b/test/content-type.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; const EXTENSION_TESTS = [ ['https://resources.whatwg.org/standard.css', 'text/css'], diff --git a/test/cors.mjs b/test/cors.mjs index 09c96d5..c4991a1 100644 --- a/test/cors.mjs +++ b/test/cors.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; const CORS_TESTS = [ // not an exhaustive list of domains, just enough to catch accidental removal diff --git a/test/hsts.mjs b/test/hsts.mjs index 93087b7..6befc2a 100644 --- a/test/hsts.mjs +++ b/test/hsts.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; const HOSTNAMES = [ // not an exhaustive list, just enough to catch accidental removal diff --git a/test/package.json b/test/package.json index 8d28121..af66376 100644 --- a/test/package.json +++ b/test/package.json @@ -1,8 +1,7 @@ { "private": true, "dependencies": { - "mocha": "^11.0.1", - "node-fetch": "^3.3.2" + "mocha": "^11.0.1" }, "scripts": { "test": "mocha --timeout=10000 --retries=3 *.mjs" diff --git a/test/redirects.mjs b/test/redirects.mjs index bd62534..9b26514 100644 --- a/test/redirects.mjs +++ b/test/redirects.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; // arrays of [url to fetch, HTTP status, location header, keep /foo?] diff --git a/test/wiki.mjs b/test/wiki.mjs index 580ee35..4d8c2e5 100644 --- a/test/wiki.mjs +++ b/test/wiki.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; describe('wiki', function() { specify('main page', async function() { diff --git a/test/x-headers.mjs b/test/x-headers.mjs index 730e558..8a14b39 100644 --- a/test/x-headers.mjs +++ b/test/x-headers.mjs @@ -1,5 +1,4 @@ import assert from 'assert'; -import fetch from 'node-fetch'; const TEST_DATA = [ // not an exhaustive list, just enough to catch accidental removal