Skip to content

Commit

Permalink
feat: add ability to specify test file (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelplex authored Jun 24, 2024
1 parent e87aa04 commit 9380020
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added support for scripts in subdirectories, for example `scripts/counter/deploy.ts`
- Added the ability to specify test files in `blueprint test` command, for example `blueprint test Counter`

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions src/cli/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const test: Runner = async (args, ui) => {
ui.write(helpMessages['test']);
return;
}

execSync('npm test', { stdio: 'inherit' });

const testArgs = args._.slice(1); // first argument is `test`, need to get rid of it
execSync(`npm test ${testArgs.join(' ')}`, { stdio: 'inherit' });
};

0 comments on commit 9380020

Please sign in to comment.