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" },