@@ -27,43 +27,53 @@ describe('#compileDeployment()', () => {
27
27
} ) ;
28
28
29
29
it ( 'should create a deployment resource' , ( ) => serverlessStepFunctions
30
- . compileDeployment ( ) . then ( ( ) => {
30
+ . compileDeployment ( )
31
+ . then ( ( ) => {
31
32
const apiGatewayDeploymentLogicalId = Object
32
33
. keys ( serverlessStepFunctions . serverless . service . provider
33
34
. compiledCloudFormationTemplate . Resources ) [ 0 ] ;
34
35
35
36
expect (
36
37
serverlessStepFunctions . serverless . service . provider . compiledCloudFormationTemplate
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
- } )
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
+ } ) ,
47
51
) ;
48
52
49
53
it ( 'should add service endpoint output' , ( ) =>
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.amazonaws.com/dev' ,
63
- ] ,
64
- ] ,
65
- } ,
66
- } ) ;
67
- } )
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
+ } ) ,
68
78
) ;
69
79
} ) ;
0 commit comments