From 4fa6686a74773cde8eaeebbdb910bda21a74f982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Matte?= Date: Mon, 2 Jun 2025 16:03:58 -0400 Subject: [PATCH] Add bin To do npx metaltest in another projet to run all test --- cli/{cli.js => suite.js} | 5 +++-- package.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) rename cli/{cli.js => suite.js} (54%) diff --git a/cli/cli.js b/cli/suite.js similarity index 54% rename from cli/cli.js rename to cli/suite.js index a644b6f..0498900 100755 --- a/cli/cli.js +++ b/cli/suite.js @@ -2,8 +2,9 @@ import { suite } from 'metaltest' -const run = async () => { - await suite(process.cwd()) +const run = async (folder) => { + if (!folder) folder = process.cwd() + await suite(folder) } const [, , folder] = process.argv diff --git a/package.json b/package.json index 75d925a..ef70bab 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Clone of baretest with reporting", "type": "module", "exports": "./index.js", + "bin": "./cli/suite.js", "scripts": { "test": "node suite.js" },