CDK
This section shows how you can use sls-jest with the CDK.
// myStack.ts
const myTable = new Table(this, 'MyTable', {
partitionKey: { name: 'pk', type: AttributeType.STRING },
sortKey: { name: 'sk', type: AttributeType.STRING },
billingMode: BillingMode.PAY_PER_REQUEST,
});
new CfnOutput(this, 'MyTableName', {
value: myTable.tableName,
});cdk deploy --all --outputs-file .sls-jest/resources.json// .sls-jest/resources.json
{
"myStack": {
"MyTableName": "myStack-MyTable72A94F83-WEE9G8164XWC"
}
}Last updated