Skip to content

Commit 7aec573

Browse files
committed
fix: import afterEach for proper test cleanup and remove redundant http import
1 parent 4b4d81b commit 7aec573

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

test/e2e/cross-origin-request.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import http from "node:http";
2-
import { describe, it } from "node:test";
2+
import { afterEach, describe, it } from "node:test";
33
import { expect } from "expect";
44
import webpack from "webpack";
55
import Server from "../../lib/Server.js";
@@ -236,8 +236,6 @@ describe("cross-origin resource policy header", () => {
236236
});
237237

238238
function request(url, headers = {}) {
239-
const http = require("node:http");
240-
241239
return new Promise((resolve, reject) => {
242240
const req = http.get(url, { headers }, (res) => {
243241
let body = "";

0 commit comments

Comments
 (0)