Hello,
I am using cdktf in ts. i have written unit test using this. These unit test checks if terraform valid and terraform plan for mentioned stack will work or not but i want to get diff of infra as output of unit tests. how can i get that ? i am using s3Backend to store state files.
import "cdktf/lib/testing/adapters/jest"; // Load types for expect matchers
import { Testing, TerraformStack } from "cdktf";
import { Infrastructure } from "../main"
describe("My CDKTF Application", () => {
it.todo("should be tested");
describe("Checking validity", () => {
it("check if the produced terraform configuration is valid", () => {
const app = Testing.app();
const stack = new TerraformStack(app, "test");
new Infrastructure(stack, 'test-infra');
expect(Testing.fullSynth(stack)).toBeValidTerraform();
});
it("check if this can be planned", () => {
const app = Testing.app();
const stack = new TerraformStack(app, "test");
new Infrastructure(stack, 'test-infra');
expect(Testing.fullSynth(stack)).toPlanSuccessfully();
});
});
});