Skip to content

Commit

Permalink
use single quotes in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
konokenj committed Mar 6, 2023
1 parent 1d78eb6 commit 1880369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -386,11 +386,11 @@ export class AwsCustomResource extends Construct implements iam.IGrantable {
}

if (props.onCreate && !props.onCreate.physicalResourceId) {
throw new Error('`physicalResourceId` must be specified for onCreate call.');
throw new Error("'physicalResourceId' must be specified for 'onCreate' call.");
}

if (!props.onCreate && props.onUpdate && !props.onUpdate.physicalResourceId) {
throw new Error('`physicalResourceId` must be specified for onUpdate call when onCreate is omitted.');
throw new Error("'physicalResourceId' must be specified for 'onUpdate' call when 'onCreate' is omitted.");
}

for (const call of [props.onCreate, props.onUpdate, props.onDelete]) {
Expand Down
Expand Up @@ -319,7 +319,7 @@ describe('physicalResourceId patterns', () => {
},
policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }),
});
}).toThrow(/`physicalResourceId` must be specified for onCreate call./);
}).toThrow(/'physicalResourceId' must be specified for 'onCreate' call./);
});

// physicalResourceId pattern #4
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('physicalResourceId patterns', () => {
},
policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }),
});
}).toThrow(/`physicalResourceId` must be specified for onCreate call./);
}).toThrow(/'physicalResourceId' must be specified for 'onCreate' call./);
});

// physicalResourceId pattern #5
Expand Down Expand Up @@ -407,7 +407,7 @@ describe('physicalResourceId patterns', () => {
},
policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }),
});
}).toThrow(/`physicalResourceId` must be specified for onCreate call./);
}).toThrow(/'physicalResourceId' must be specified for 'onCreate' call./);
});

// physicalResourceId pattern #7
Expand Down

0 comments on commit 1880369

Please sign in to comment.