From c198aebf9c8e40937cb9687b14fb19fe0dd96960 Mon Sep 17 00:00:00 2001 From: Kenji Kono <93309555+konokenj@users.noreply.github.com> Date: Mon, 6 Mar 2023 18:07:54 +0900 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Calvin Combs <66279577+comcalvi@users.noreply.github.com> --- .../test/aws-custom-resource/aws-custom-resource.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts index ff3dcb2e5bde5..6d96326381d2e 100644 --- a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts +++ b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts @@ -414,7 +414,7 @@ describe('physicalResourceId patterns', () => { }); // physicalResourceId pattern #7 - test('physicalResourceId is specified in onUpdate with empty onCreate then success', () => { + test('onCreate and onUpdate both have physicalResourceId when physicalResourceId is specified in onUpdate, even when onCreate is unspecified', () => { // GIVEN const stack = new cdk.Stack(); @@ -460,7 +460,7 @@ describe('physicalResourceId patterns', () => { }); // physicalResourceId pattern #8 - test('physicalResourceId is not specified onCreate with empty onUpdate then fail', () => { + test('Omitting physicalResourceId in onCreate when onUpdate is undefined throws an error', () => { // GIVEN const stack = new cdk.Stack(); @@ -478,7 +478,7 @@ describe('physicalResourceId patterns', () => { }, policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }), }); - }).toThrow(/`physicalResourceId` must be specified for onUpdate call when onCreate is omitted./); + }).toThrow(/'physicalResourceId' must be specified for 'onUpdate' call when 'onCreate' is omitted./); }); });