Skip to content

Commit

Permalink
fix: scripts/test.mjs now spreads arguments to jest
Browse files Browse the repository at this point in the history
  • Loading branch information
CMCDragonkai committed Aug 14, 2023
1 parent a5b3ce6 commit 90a98df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const projectPath = path.dirname(
const platform = os.platform();

/* eslint-disable no-console */
async function main() {
async function main(argv = process.argv) {
argv = argv.slice(2);
const tscArgs = [`-p`, path.join(projectPath, 'tsconfig.build.json')];
console.error('Running tsc:');
console.error(['tsc', ...tscArgs].join(' '));
Expand All @@ -23,7 +24,7 @@ async function main() {
encoding: 'utf-8',
shell: platform === 'win32' ? true : false,
});
const jestArgs = [];
const jestArgs = [...argv];
console.error('Running jest:');
console.error(['jest', ...jestArgs].join(' '));
childProcess.execFileSync('jest', jestArgs, {
Expand Down

0 comments on commit 90a98df

Please sign in to comment.