Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/node_compat/run_all_test_unmodified.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
} from "./common.ts";
import { generateTestSerialId } from "./test.ts";

const testSuitePath = new URL(import.meta.resolve("./runner/suite/"));
const testDirUrl = new URL("runner/suite/test/", import.meta.url).href;
const IS_CI = !!Deno.env.get("CI");
// The timeout ms for single test execution. If a single test didn't finish in this timeout milliseconds, the test is considered as failure
Expand Down Expand Up @@ -171,10 +172,11 @@ export async function runSingle(
): Promise<NodeTestFileReport> {
const testSerialId = generateTestSerialId();
let cmd: Deno.ChildProcess | undefined;
const testPath_ = "tests/node_compat/runner/suite/test/" + testPath;
const testPath_ = "test/" + testPath;
let usesNodeTest = false;
try {
const source = await Deno.readTextFile(testPath_);
const testFileUrl = new URL(testPath_, testSuitePath);
const source = await Deno.readTextFile(testFileUrl);
usesNodeTest = usesNodeTestModule(source);
if (NODE_IGNORED_TEST_CASES.has(testPath)) {
return { result: NodeTestFileResult.IGNORED, usesNodeTest };
Expand All @@ -195,6 +197,7 @@ export async function runSingle(
},
stdout: "piped",
stderr: "piped",
cwd: testSuitePath,
}).spawn();
const result = await deadline(cmd.output(), TIMEOUT);
if (result.code === 0) {
Expand Down
Loading