Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(aws-cdk-lib): catch another proptest failure #32751

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions packages/aws-cdk-lib/core/test/aspect.prop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ test('inherited aspects get invoked before locally defined aspects, if both have

if (!(aInherited == true && bInherited == false)) return;

// But only if the application of aspect A exists at least as long as the application of aspect B
const aAppliedT = aspectAppliedT(testApp, a.aspect, a.construct);
const bAppliedT = aspectAppliedT(testApp, b.aspect, b.construct);

if (!(aAppliedT <= bAppliedT)) return;

if (!(a.index < b.index)) {
throw new Error(
`Aspect ${a.aspect}@${aPrio} at ${a.index} should have been before ${b.aspect}@${bPrio} at ${b.index}, but was after`,
Expand Down
Loading