Skip to content

Commit

Permalink
fix config initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
m2rads committed Jan 2, 2025
1 parent 5d7147c commit bffa2fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/shortest/src/cli/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ async function main() {
const noCache = args.includes("--no-cache");

try {
const config = getConfig();
const testPattern = cliTestPattern || config.testPattern; // Use CLI argument if provided, otherwise use config

const runner = new TestRunner(
process.cwd(),
true,
Expand All @@ -150,6 +147,8 @@ async function main() {
noCache,
);
await runner.initialize();
const config = getConfig();
const testPattern = cliTestPattern || config.testPattern;
await runner.runTests(testPattern);
} catch (error) {
if (error instanceof Error) {
Expand Down

0 comments on commit bffa2fe

Please sign in to comment.