slightly different error now though
# help
k
slightly different error now though
d
I am also experiencing similar issues. Just so you know you're not flying solo on this one
k
trying to see if i could find the answer on googles 😛 but cant see anything in the AWS stuff herehttps://cdkworkshop.com/20-typescript/70-advanced-topics/100-construct-testing/1000-assertion-test.html
f
@Kristian Lake @Devin the assert library has been revamped v2. Change this:
Copy code
import { ... } from "@aws-cdk/assert";

expect(stack).to(
  haveResource("AWS::DynamoDB::Table", {
    BillingMode: "PAY_PER_REQUEST",
  })
);
to:
Copy code
import { Template } from "aws-cdk-lib/assertions";

const template = Template.fromStack(stack);
template.hasResource("AWS::DynamoDB::Table", {
  BillingMode: "PAY_PER_REQUEST",
});
k
Thanks Frank. Managed to fix it up with the link you gave
template.hasResourceProperties("AWS:DynamoDB:Table", {