@@ -27,53 +27,45 @@ describe('#compileDeployment()', () => {
27
27
} ) ;
28
28
29
29
it ( 'should create a deployment resource' , ( ) => serverlessStepFunctions
30
- . compileDeployment ( )
31
- . then ( ( ) => {
30
+ . compileDeployment ( ) . then ( ( ) => {
32
31
const apiGatewayDeploymentLogicalId = Object
33
32
. keys ( serverlessStepFunctions . serverless . service . provider
34
33
. compiledCloudFormationTemplate . Resources ) [ 0 ] ;
35
34
36
35
expect (
37
36
serverlessStepFunctions . serverless . service . provider . compiledCloudFormationTemplate
38
- . Resources [ apiGatewayDeploymentLogicalId ] ,
39
- )
40
- . to
41
- . deep
42
- . equal ( {
43
- Type : 'AWS::ApiGateway::Deployment' ,
44
- DependsOn : [ 'method-dependency1' , 'method-dependency2' ] ,
45
- Properties : {
46
- RestApiId : { Ref : serverlessStepFunctions . apiGatewayRestApiLogicalId } ,
47
- StageName : 'dev' ,
48
- } ,
49
- } ) ;
50
- } ) ,
37
+ . Resources [ apiGatewayDeploymentLogicalId ]
38
+ ) . to . deep . equal ( {
39
+ Type : 'AWS::ApiGateway::Deployment' ,
40
+ DependsOn : [ 'method-dependency1' , 'method-dependency2' ] ,
41
+ Properties : {
42
+ RestApiId : { Ref : serverlessStepFunctions . apiGatewayRestApiLogicalId } ,
43
+ StageName : 'dev' ,
44
+ } ,
45
+ } ) ;
46
+ } )
51
47
) ;
52
48
53
49
it ( 'should add service endpoint output' , ( ) =>
54
- serverlessStepFunctions . compileDeployment ( )
55
- . then ( ( ) => {
56
- expect (
57
- serverlessStepFunctions . serverless . service . provider . compiledCloudFormationTemplate
58
- . Outputs . ServiceEndpoint ,
59
- )
60
- . to
61
- . deep
62
- . equal ( {
63
- Description : 'URL of the service endpoint' ,
64
- Value : {
65
- 'Fn::Join' : [
66
- '' ,
67
- [
68
- 'https://' ,
69
- { Ref : serverlessStepFunctions . apiGatewayRestApiLogicalId } ,
70
- '.execute-api.us-east-1.' ,
71
- { Ref : 'AWS::URLSuffix' } ,
72
- '/dev' ,
73
- ] ,
74
- ] ,
75
- } ,
76
- } ) ;
77
- } ) ,
50
+ serverlessStepFunctions . compileDeployment ( ) . then ( ( ) => {
51
+ expect (
52
+ serverlessStepFunctions . serverless . service . provider . compiledCloudFormationTemplate
53
+ . Outputs . ServiceEndpoint
54
+ ) . to . deep . equal ( {
55
+ Description : 'URL of the service endpoint' ,
56
+ Value : {
57
+ 'Fn::Join' : [
58
+ '' ,
59
+ [
60
+ 'https://' ,
61
+ { Ref : serverlessStepFunctions . apiGatewayRestApiLogicalId } ,
62
+ '.execute-api.us-east-1.' ,
63
+ { Ref : 'AWS::URLSuffix' } ,
64
+ '/dev' ,
65
+ ] ,
66
+ ] ,
67
+ } ,
68
+ } ) ;
69
+ } )
78
70
) ;
79
71
} ) ;
0 commit comments