Skip to content

Commit

Permalink
chore: export variables from node compat tools script (#27189)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy authored Dec 2, 2024
1 parent 1d49b3c commit f9a6cc3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/node_compat/runner/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const encoder = new TextEncoder();

const NODE_VERSION = version;

const NODE_IGNORED_TEST_DIRS = [
export const NODE_IGNORED_TEST_DIRS = [
"addons",
"async-hooks",
"cctest",
Expand All @@ -40,13 +40,13 @@ const NODE_IGNORED_TEST_DIRS = [
"wpt",
];

const VENDORED_NODE_TEST = new URL("./suite/test/", import.meta.url);
const NODE_COMPAT_TEST_DEST_URL = new URL(
export const VENDORED_NODE_TEST = new URL("./suite/test/", import.meta.url);
export const NODE_COMPAT_TEST_DEST_URL = new URL(
"../test/",
import.meta.url,
);

async function getNodeTests(): Promise<string[]> {
export async function getNodeTests(): Promise<string[]> {
const paths: string[] = [];
const rootPath = VENDORED_NODE_TEST.href.slice(7);
for await (
Expand All @@ -61,7 +61,7 @@ async function getNodeTests(): Promise<string[]> {
return paths.sort();
}

function getDenoTests() {
export function getDenoTests() {
return Object.entries(config.tests)
.filter(([testDir]) => !NODE_IGNORED_TEST_DIRS.includes(testDir))
.flatMap(([testDir, tests]) => tests.map((test) => testDir + "/" + test));
Expand Down

0 comments on commit f9a6cc3

Please sign in to comment.