aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimmy Willison <timmywil@users.noreply.github.com>2024-03-08 18:18:24 -0500
committerTimmy Willison <timmywil@users.noreply.github.com>2024-03-09 10:36:47 -0500
commit5aa7ed888ddf314fba3c4f8750b891cb6427c9c2 (patch)
tree33bed551762397ac376da1ca2d458c3f2e88e883 /test
parent0293d3e30dd68bfe92be1d6d29f9b9200d1ae917 (diff)
downloadjquery-5aa7ed888ddf314fba3c4f8750b891cb6427c9c2.tar.gz
jquery-5aa7ed888ddf314fba3c4f8750b891cb6427c9c2.zip
Build: drop support for Node 10
Close gh-5436
Diffstat (limited to 'test')
-rw-r--r--test/middleware-mockserver.cjs4
-rw-r--r--test/runner/createTestServer.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/test/middleware-mockserver.cjs b/test/middleware-mockserver.cjs
index 8a175d6f2..0b513f042 100644
--- a/test/middleware-mockserver.cjs
+++ b/test/middleware-mockserver.cjs
@@ -1,7 +1,7 @@
"use strict";
-const url = require( "url" );
-const fs = require( "fs" );
+const url = require( "node:url" );
+const fs = require( "node:fs" );
const getRawBody = require( "raw-body" );
const multiparty = require( "multiparty" );
diff --git a/test/runner/createTestServer.js b/test/runner/createTestServer.js
index b78fed278..d9ea9e280 100644
--- a/test/runner/createTestServer.js
+++ b/test/runner/createTestServer.js
@@ -1,12 +1,12 @@
import bodyParser from "body-parser";
import express from "express";
import bodyParserErrorHandler from "express-body-parser-error-handler";
-import fs from "fs";
+import { readFile } from "fs/promises";
import mockServer from "../middleware-mockserver.cjs";
export async function createTestServer( report ) {
- const nameHTML = await fs.promises.readFile( "./test/data/name.html", "utf8" );
- const indexHTML = await fs.promises.readFile( "./test/index.html", "utf8" );
+ const nameHTML = await readFile( "./test/data/name.html", "utf8" );
+ const indexHTML = await readFile( "./test/index.html", "utf8" );
const app = express();
// Redirect home to test page