File tree 3 files changed +7
-7
lines changed
packages/@aws-cdk/aws-codecommit
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 84
84
},
85
85
"license" : " Apache-2.0" ,
86
86
"devDependencies" : {
87
- "@aws-cdk/assert-internal " : " 0.0.0" ,
87
+ "@aws-cdk/assertions " : " 0.0.0" ,
88
88
"@aws-cdk/aws-sns" : " 0.0.0" ,
89
89
"@aws-cdk/cdk-build-tools" : " 0.0.0" ,
90
90
"@aws-cdk/cdk-integ-tools" : " 0.0.0" ,
Original file line number Diff line number Diff line change 1
- import '@aws-cdk/assert-internal/jest' ;
2
1
import { join , resolve } from 'path' ;
2
+ import { Template } from '@aws-cdk/assertions' ;
3
3
import { Role , ServicePrincipal } from '@aws-cdk/aws-iam' ;
4
4
import { Asset } from '@aws-cdk/aws-s3-assets' ;
5
5
import * as cxschema from '@aws-cdk/cloud-assembly-schema' ;
@@ -19,7 +19,7 @@ describe('codecommit', () => {
19
19
20
20
new Repository ( stack , 'MyRepository' , props ) . notify ( snsArn ) ;
21
21
22
- expect ( stack ) . toMatchTemplate ( {
22
+ Template . fromStack ( stack ) . templateMatches ( {
23
23
Resources : {
24
24
MyRepository4C4BD5FC : {
25
25
Type : 'AWS::CodeCommit::Repository' ,
@@ -258,7 +258,7 @@ describe('codecommit', () => {
258
258
repository . grantPullPush ( role ) ;
259
259
260
260
// THEN
261
- expect ( stack ) . toHaveResource ( 'AWS::IAM::Policy' , {
261
+ Template . fromStack ( stack ) . hasResourceProperties ( 'AWS::IAM::Policy' , {
262
262
PolicyDocument : {
263
263
Statement : [
264
264
{
Original file line number Diff line number Diff line change 1
- import '@aws-cdk/assert-internal/jest ' ;
1
+ import { Template } from '@aws-cdk/assertions ' ;
2
2
import * as sns from '@aws-cdk/aws-sns' ;
3
3
import * as cdk from '@aws-cdk/core' ;
4
4
import * as codecommit from '../lib' ;
@@ -16,7 +16,7 @@ describe('notification rule', () => {
16
16
17
17
repository . notifyOnPullRequestMerged ( 'NotifyOnPullRequestMerged' , target ) ;
18
18
19
- expect ( stack ) . toHaveResource ( 'AWS::CodeStarNotifications::NotificationRule' , {
19
+ Template . fromStack ( stack ) . hasResourceProperties ( 'AWS::CodeStarNotifications::NotificationRule' , {
20
20
Name : 'MyCodecommitRepositoryNotifyOnPullRequestCreatedBB14EA32' ,
21
21
DetailType : 'FULL' ,
22
22
EventTypeIds : [
@@ -38,7 +38,7 @@ describe('notification rule', () => {
38
38
] ,
39
39
} ) ;
40
40
41
- expect ( stack ) . toHaveResource ( 'AWS::CodeStarNotifications::NotificationRule' , {
41
+ Template . fromStack ( stack ) . hasResourceProperties ( 'AWS::CodeStarNotifications::NotificationRule' , {
42
42
Name : 'MyCodecommitRepositoryNotifyOnPullRequestMerged34A7EDF1' ,
43
43
DetailType : 'FULL' ,
44
44
EventTypeIds : [
You can’t perform that action at this time.
0 commit comments