@aws-cdk-testing/cli-integ
Version:
Integration tests for the AWS CDK CLI
14 lines (10 loc) • 568 B
text/typescript
import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib';
integTest('typescript init lib', withTemporaryDirectory(withPackages(async (context) => {
const shell = ShellHelper.fromContext(context);
await context.packages.makeCliAvailable();
await shell.shell(['cdk', 'init', '-l', 'typescript', 'lib']);
await shell.shell(['npm', 'prune']);
await shell.shell(['npm', 'ls']); // this will fail if we have unmet peer dependencies
await shell.shell(['npm', 'run', 'build']);
await shell.shell(['npm', 'run', 'test']);
})));