Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: export variables for better consumption from the outside #27189

Merged
merged 1 commit into from
Dec 2, 2024
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
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