1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

chore: export variables from node compat tools script (#27189)

This commit is contained in:
Mathias Lykkegaard Lorenzen 2024-12-02 16:05:59 +01:00 committed by GitHub
parent 1d49b3cb0f
commit f9a6cc3f03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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",
@ -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 (
@ -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));