Skip to content

Commit

Permalink
WIP: simplify unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Sumu <sumughan@amazon.com>
  • Loading branch information
sumupitchayan committed Dec 23, 2024
1 parent d296c8e commit 49915a2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/aws-cdk-lib/core/test/aspect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,8 @@ describe('aspect', () => {
])('Error is not thrown if Aspects.applied does not exist (stabilization: $stabilization)', ({ stabilization }) => {
const app = new App({ context: { '@aws-cdk/core:aspectStabilization': stabilization } });
const root = new Stack(app, 'My-Stack');
const child = new Bucket(root, 'my-bucket', {
bucketName: 'my-bucket',
});

Aspects.of(root).add(new Tag('AspectA', 'Visited'), { priority: 10 });
Aspects.of(root).add(new Tag('AspectA', 'Visited'));

// "Monkey patching" - Override `applied` to simulate its absence
Object.defineProperty(Aspects.prototype, 'applied', {
Expand Down

0 comments on commit 49915a2

Please sign in to comment.