diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts index 9018ec1bd5345..609cf50d297c6 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts @@ -102,19 +102,11 @@ integTest('cdk synth', withDefaultFixture(async (fixture) => { }, })); - expect(fixture.template('test-1')).toEqual(expect.not.objectContaining({ - Resources: { - CDKMetadata: { - Type: 'AWS::CDK::Metadata', - }, - }, - })); - - expect(fixture.template('test-1')).toEqual(expect.not.objectContaining({ - Rules: { - CheckBootstrapVersion: expect.anything(), - }, - })); + expect(await fixture.cdkSynth({ + options: [fixture.fullStackName('test-1')], + })).not.toEqual(expect.stringContaining(` +Rules: + CheckBootstrapVersion:`)); await fixture.cdk(['synth', fixture.fullStackName('test-2')], { verbose: false }); expect(fixture.template('test-2')).toEqual(expect.objectContaining({