Skip to content

Commit

Permalink
Update Node.js used for testing
Browse files Browse the repository at this point in the history
Notably, node-fetch is no longer required.
  • Loading branch information
domenic authored Jan 15, 2025
1 parent 67ba2a5 commit d2e22b7
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
test:
name: Test
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
defaults:
run:
working-directory: test
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion test/blog.mjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion test/build.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from 'assert';
import fetch from 'node-fetch';

describe('build', function() {
specify('/version', async function() {
Expand Down
1 change: 0 additions & 1 deletion test/caching.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from 'assert';
import fetch from 'node-fetch';

const CACHE_TESTS = [
'https://html.spec.whatwg.org/fonts/Essays1743.ttf',
Expand Down
1 change: 0 additions & 1 deletion test/content-type.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from 'assert';
import fetch from 'node-fetch';

const EXTENSION_TESTS = [
['https://resources.whatwg.org/standard.css', 'text/css'],
Expand Down
1 change: 0 additions & 1 deletion test/cors.mjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion test/hsts.mjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions test/package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion test/redirects.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from 'assert';
import fetch from 'node-fetch';

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

Expand Down
1 change: 0 additions & 1 deletion test/wiki.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import assert from 'assert';
import fetch from 'node-fetch';

describe('wiki', function() {
specify('main page', async function() {
Expand Down
1 change: 0 additions & 1 deletion test/x-headers.mjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d2e22b7

Please sign in to comment.