Skip to content

Commit d2e22b7

Browse files
authored
Update Node.js used for testing
Notably, node-fetch is no longer required.
1 parent 67ba2a5 commit d2e22b7

11 files changed

+3
-13
lines changed

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
test:
1515
name: Test
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-latest
1717
defaults:
1818
run:
1919
working-directory: test
@@ -23,7 +23,7 @@ jobs:
2323
submodules: true
2424
- uses: actions/setup-node@v4
2525
with:
26-
node-version: 20
26+
node-version: lts/*
2727
- run: npm install
2828
- run: npm test
2929
env:

test/blog.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
describe('blog', function() {
54
// regression test for https://github.com/whatwg/meta/issues/59

test/build.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
describe('build', function() {
54
specify('/version', async function() {

test/caching.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
const CACHE_TESTS = [
54
'https://html.spec.whatwg.org/fonts/Essays1743.ttf',

test/content-type.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
const EXTENSION_TESTS = [
54
['https://resources.whatwg.org/standard.css', 'text/css'],

test/cors.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
const CORS_TESTS = [
54
// not an exhaustive list of domains, just enough to catch accidental removal

test/hsts.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
const HOSTNAMES = [
54
// not an exhaustive list, just enough to catch accidental removal

test/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"private": true,
33
"dependencies": {
4-
"mocha": "^11.0.1",
5-
"node-fetch": "^3.3.2"
4+
"mocha": "^11.0.1"
65
},
76
"scripts": {
87
"test": "mocha --timeout=10000 --retries=3 *.mjs"

test/redirects.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
// arrays of [url to fetch, HTTP status, location header, keep /foo?]
54

test/wiki.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
describe('wiki', function() {
54
specify('main page', async function() {

test/x-headers.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import assert from 'assert';
2-
import fetch from 'node-fetch';
32

43
const TEST_DATA = [
54
// not an exhaustive list, just enough to catch accidental removal

0 commit comments

Comments
 (0)