aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
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