mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Add helper for running node tests
This commit is contained in:
@@ -52,6 +52,10 @@ const integrationTimeout = 5 * 60_000;
|
||||
const { values: options, positionals: filters } = parseArgs({
|
||||
allowPositionals: true,
|
||||
options: {
|
||||
["node-tests"]: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
},
|
||||
["exec-path"]: {
|
||||
type: "string",
|
||||
default: "bun",
|
||||
@@ -949,10 +953,14 @@ async function getVendorTests(cwd) {
|
||||
* @returns {string[]}
|
||||
*/
|
||||
function getRelevantTests(cwd) {
|
||||
const tests = getTests(cwd);
|
||||
let tests = getTests(cwd);
|
||||
const availableTests = [];
|
||||
const filteredTests = [];
|
||||
|
||||
if (options["node-tests"]) {
|
||||
tests = tests.filter(testPath => testPath.includes("js/node/test/parallel/"));
|
||||
}
|
||||
|
||||
const isMatch = (testPath, filter) => {
|
||||
return testPath.replace(/\\/g, "/").includes(filter);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user