Skip to content

Commit 271f754

Browse files
committed
fix(scripts): repair the Makefile test paths and the e2e name filter
Three Makefile targets globbed a test/ directory that has never existed here, so test-unit, test-contract and test-live-check could not run at all. run-live.mjs selected the end-to-end scenarios with --test-name-pattern=E2E, which matched only because the titles used to embed an upstream test name. Renaming the scenarios to snake_case left the pattern matching nothing, so `make test-e2e` would have exited zero after running no tests; it now matches the _e2e suffix and selects three scenarios per client.
1 parent da26bb6 commit 271f754

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ test:
1010
npm test
1111

1212
test-unit: build
13-
node --test test/*.test.mjs
13+
node --test tests/*.test.mjs
1414

1515
test-contract: build
16-
node --test test/api-contracts.test.mjs
16+
node --test tests/api-contracts.test.mjs
1717

1818
test-scenarios:
1919
npm run test:scenarios
@@ -28,7 +28,7 @@ test-live-all: build
2828
LIVE_ENV_FILE="$(LIVE_ENV_FILE)" node scripts/run-live.mjs all
2929

3030
test-live-check: build
31-
@for file in test/live/*.mjs; do node --check "$$file" || exit; done
31+
@for file in tests/live/*.mjs; do node --check "$$file" || exit; done
3232

3333
test-e2e: test
3434
LIVE_ENV_FILE="$(LIVE_ENV_FILE)" node scripts/run-live.mjs e2e

scripts/run-live.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for (const selected of modes) {
1818
}
1919
const files = readdirSync('tests/live').filter(name => name.endsWith('.test.mjs') && modes.some(mode => name.startsWith(mode))).map(name => `tests/live/${name}`);
2020
const args = ['--test', '--test-concurrency=1'];
21-
if (mode === 'e2e') args.push('--test-name-pattern=E2E');
21+
if (mode === 'e2e') args.push('--test-name-pattern=_e2e$');
2222
args.push(...files);
2323
const result = spawnSync(process.execPath, args, { stdio: 'inherit' });
2424
process.exit(result.status ?? 1);

0 commit comments

Comments
 (0)