1
- import '@aws-cdk/assert-internal/jest ' ;
1
+ import { Template } from '@aws-cdk/assertions ' ;
2
2
import * as cdk from '@aws-cdk/core' ;
3
3
import * as signer from '../lib' ;
4
4
@@ -14,7 +14,7 @@ describe('signing profile', () => {
14
14
const platform = signer . Platform . AWS_LAMBDA_SHA384_ECDSA ;
15
15
new signer . SigningProfile ( stack , 'SigningProfile' , { platform } ) ;
16
16
17
- expect ( stack ) . toHaveResource ( 'AWS::Signer::SigningProfile' , {
17
+ Template . fromStack ( stack ) . hasResourceProperties ( 'AWS::Signer::SigningProfile' , {
18
18
PlatformId : platform . platformId ,
19
19
SignatureValidityPeriod : {
20
20
Type : 'MONTHS' ,
@@ -30,7 +30,7 @@ describe('signing profile', () => {
30
30
signatureValidity : cdk . Duration . days ( 7 ) ,
31
31
} ) ;
32
32
33
- expect ( stack ) . toHaveResource ( 'AWS::Signer::SigningProfile' , {
33
+ Template . fromStack ( stack ) . hasResourceProperties ( 'AWS::Signer::SigningProfile' , {
34
34
PlatformId : platform . platformId ,
35
35
SignatureValidityPeriod : {
36
36
Type : 'DAYS' ,
@@ -47,7 +47,7 @@ describe('signing profile', () => {
47
47
cdk . Tags . of ( signing ) . add ( 'tag2' , 'value2' ) ;
48
48
cdk . Tags . of ( signing ) . add ( 'tag3' , '' ) ;
49
49
50
- expect ( stack ) . toHaveResource ( 'AWS::Signer::SigningProfile' , {
50
+ Template . fromStack ( stack ) . hasResourceProperties ( 'AWS::Signer::SigningProfile' , {
51
51
PlatformId : platform . platformId ,
52
52
SignatureValidityPeriod : {
53
53
Type : 'MONTHS' ,
@@ -109,7 +109,7 @@ describe('signing profile', () => {
109
109
] ,
110
110
] ,
111
111
} ) ;
112
- expect ( stack ) . toMatchTemplate ( { } ) ;
112
+ Template . fromStack ( stack ) . templateMatches ( { } ) ;
113
113
} ) ;
114
114
} ) ;
115
115
} ) ;
0 commit comments