diff options
author | Timmy Willison <timmywil@users.noreply.github.com> | 2024-03-08 18:18:24 -0500 |
---|---|---|
committer | Timmy Willison <timmywil@users.noreply.github.com> | 2024-03-09 10:36:33 -0500 |
commit | 79329f5015afedbbb8cf9e02bd7ba0446564bf07 (patch) | |
tree | ed794795b8d4601c24b21b1bb818005e76831f26 /test | |
parent | 2ab173df6a4668f4453a7e48855747b5b15bf773 (diff) | |
download | jquery-79329f5015afedbbb8cf9e02bd7ba0446564bf07.tar.gz jquery-79329f5015afedbbb8cf9e02bd7ba0446564bf07.zip |
Build: drop support for Node 10
Close gh-5437
Diffstat (limited to 'test')
-rw-r--r-- | test/middleware-mockserver.js | 4 | ||||
-rw-r--r-- | test/runner/createTestServer.js | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/middleware-mockserver.js b/test/middleware-mockserver.js index 1ac210ab3..133af1a77 100644 --- a/test/middleware-mockserver.js +++ b/test/middleware-mockserver.js @@ -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" ); let cspLog = ""; diff --git a/test/runner/createTestServer.js b/test/runner/createTestServer.js index 4ee783b6f..81eb1bd6a 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.js"; 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 |