Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Resolve paths to nyc & nodeunit #887

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions tools/cdk-build-tools/bin/cdk-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ async function main() {
desc: 'Specify a different tsc executable',
defaultDescription: 'tsc provided by node dependencies'
})
.option('nyc', {
type: 'string',
desc: 'Specify a different nyc executable',
default: require.resolve('nyc/bin/nyc'),
defaultDescription: 'nyc provided by node dependencies'
})
.option('nodeunit', {
type: 'string',
desc: 'Specify a different nodeunit executable',
default: require.resolve('nodeunit/bin/nodeunit'),
defaultDescription: 'nodeunit provided by node dependencies'
})
.argv as any;

// Always recompile before running tests, so it's impossible to forget.
Expand All @@ -53,9 +65,9 @@ async function main() {
// It's okay if the symlink already exists
if (e.code !== 'EEXIST') { throw e; }
}
testCommand.push(...['nyc', '--clean']);
testCommand.push(...[args.nyc, '--clean']);
}
testCommand.push('nodeunit');
testCommand.push(args.nodeunit);
testCommand.push(...testFiles.map(f => f.path));

await shell(testCommand, timers);
Expand Down
2 changes: 2 additions & 0 deletions tools/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
"jsii": "^0.7.6",
"jsii-pacmak": "^0.7.6",
"merkle-build": "^0.10.0",
"nodeunit": "^0.11.3",
"nyc": "^13.0.1",
"typescript": "^3.0.1",
"yargs": "^9.0.1"
},
Expand Down