The tests check both behavior and infrastructure shape.
The implementation has workflow unit tests, construct-level tests, full-stack assertion
tests, and a before/after comparison test. The comparison is there because the developer
interface changed, but the architecture should not quietly change with it.
it("keeps the same architectural shape while changing the developer interface", () => {
const beforeApp = new App();
const afterApp = new App();
const before = Template.fromStack(new BeforeHandWiredStack(beforeApp, "BeforeStack"));
const after = Template.fromStack(new AfterConstructLibraryStack(afterApp, "AfterStack"));
expect(selectedResourceCounts(before)).toEqual(selectedResourceCounts(after));
});
TypeScript build passed Vitest suite 4 files, 15 tests CDK synth default and comparison apps synthesize successfully