diff --git a/CHANGELOG.md b/CHANGELOG.md index c73febb..e6cecfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/cli/test.ts b/src/cli/test.ts index dfb0a19..ad77d19 100644 --- a/src/cli/test.ts +++ b/src/cli/test.ts @@ -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' }); };