Skip to content

Commit 1cd4a7a

Browse files
committed
fix: scripts/test.mjs now spreads arguments to jest
1 parent 23fb4a9 commit 1cd4a7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/test.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const projectPath = path.dirname(
1313
const platform = os.platform();
1414

1515
/* eslint-disable no-console */
16-
async function main() {
16+
async function main(argv = process.argv) {
17+
argv = argv.slice(2);
1718
const tscArgs = [`-p`, path.join(projectPath, 'tsconfig.build.json')];
1819
console.error('Running tsc:');
1920
console.error(['tsc', ...tscArgs].join(' '));
@@ -23,7 +24,7 @@ async function main() {
2324
encoding: 'utf-8',
2425
shell: platform === 'win32' ? true : false,
2526
});
26-
const jestArgs = [];
27+
const jestArgs = [...argv];
2728
console.error('Running jest:');
2829
console.error(['jest', ...jestArgs].join(' '));
2930
childProcess.execFileSync('jest', jestArgs, {

0 commit comments

Comments
 (0)