Skip to content

Commit 4e4f7d2

Browse files
authored
chore(signer): migrate tests to assertions (#18504)
---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 0e757a5 commit 4e4f7d2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/@aws-cdk/aws-signer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575
"license": "Apache-2.0",
7676
"devDependencies": {
77-
"@aws-cdk/assert-internal": "0.0.0",
77+
"@aws-cdk/assertions": "0.0.0",
7878
"@aws-cdk/cdk-build-tools": "0.0.0",
7979
"@aws-cdk/cfn2ts": "0.0.0",
8080
"@aws-cdk/pkglint": "0.0.0",

packages/@aws-cdk/aws-signer/test/signing-profile.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as cdk from '@aws-cdk/core';
33
import * as signer from '../lib';
44

@@ -14,7 +14,7 @@ describe('signing profile', () => {
1414
const platform = signer.Platform.AWS_LAMBDA_SHA384_ECDSA;
1515
new signer.SigningProfile( stack, 'SigningProfile', { platform } );
1616

17-
expect(stack).toHaveResource('AWS::Signer::SigningProfile', {
17+
Template.fromStack(stack).hasResourceProperties('AWS::Signer::SigningProfile', {
1818
PlatformId: platform.platformId,
1919
SignatureValidityPeriod: {
2020
Type: 'MONTHS',
@@ -30,7 +30,7 @@ describe('signing profile', () => {
3030
signatureValidity: cdk.Duration.days( 7 ),
3131
} );
3232

33-
expect(stack).toHaveResource('AWS::Signer::SigningProfile', {
33+
Template.fromStack(stack).hasResourceProperties('AWS::Signer::SigningProfile', {
3434
PlatformId: platform.platformId,
3535
SignatureValidityPeriod: {
3636
Type: 'DAYS',
@@ -47,7 +47,7 @@ describe('signing profile', () => {
4747
cdk.Tags.of(signing).add('tag2', 'value2');
4848
cdk.Tags.of(signing).add('tag3', '');
4949

50-
expect(stack).toHaveResource('AWS::Signer::SigningProfile', {
50+
Template.fromStack(stack).hasResourceProperties('AWS::Signer::SigningProfile', {
5151
PlatformId: platform.platformId,
5252
SignatureValidityPeriod: {
5353
Type: 'MONTHS',
@@ -109,7 +109,7 @@ describe('signing profile', () => {
109109
],
110110
],
111111
});
112-
expect(stack).toMatchTemplate({});
112+
Template.fromStack(stack).templateMatches({});
113113
});
114114
} );
115115
});

0 commit comments

Comments
 (0)