@@ -36,6 +36,7 @@ describe('synthesis', () => {
36
36
} ,
37
37
} ) ,
38
38
} ) ;
39
+
39
40
} ) ;
40
41
41
42
test ( 'synthesis respects disabling tree metadata' , ( ) => {
@@ -44,87 +45,7 @@ describe('synthesis', () => {
44
45
} ) ;
45
46
const assembly = app . synth ( ) ;
46
47
expect ( list ( assembly . directory ) ) . toEqual ( [ 'cdk.out' , 'manifest.json' ] ) ;
47
- } ) ;
48
-
49
- test ( 'synthesis respects disabling logicalId metadata' , ( ) => {
50
- const app = new cdk . App ( {
51
- context : { 'aws:cdk:disable-logicalId-metadata' : true } ,
52
- } ) ;
53
- const stack = new cdk . Stack ( app , 'one-stack' ) ;
54
- new cdk . CfnResource ( stack , 'MagicResource' , { type : 'Resource::Type' } ) ;
55
-
56
- // WHEN
57
- const session = app . synth ( ) ;
58
-
59
- // THEN
60
- expect ( session . manifest ) . toEqual ( {
61
- version : cxschema . Manifest . version ( ) ,
62
- artifacts : {
63
- 'Tree' : {
64
- type : 'cdk:tree' ,
65
- properties : { file : 'tree.json' } ,
66
- } ,
67
- 'one-stack' : {
68
- type : 'aws:cloudformation:stack' ,
69
- environment : 'aws://unknown-account/unknown-region' ,
70
- properties : {
71
- templateFile : 'one-stack.template.json' ,
72
- validateOnSynth : false ,
73
- } ,
74
- displayName : 'one-stack' ,
75
- // no metadata, because the only entry was a logicalId
76
- } ,
77
- } ,
78
- } ) ;
79
- } ) ;
80
-
81
- test ( 'synthesis respects disabling logicalId metadata, and does not disable other metadata' , ( ) => {
82
- const app = new cdk . App ( {
83
- context : { 'aws:cdk:disable-logicalId-metadata' : true } ,
84
- stackTraces : false ,
85
- } ) ;
86
- const stack = new cdk . Stack ( app , 'one-stack' , { tags : { boomTag : 'BOOM' } } ) ;
87
- new cdk . CfnResource ( stack , 'MagicResource' , { type : 'Resource::Type' } ) ;
88
-
89
- // WHEN
90
- const session = app . synth ( ) ;
91
48
92
- // THEN
93
- expect ( session . manifest ) . toEqual ( {
94
- version : cxschema . Manifest . version ( ) ,
95
- artifacts : {
96
- 'Tree' : {
97
- type : 'cdk:tree' ,
98
- properties : { file : 'tree.json' } ,
99
- } ,
100
- 'one-stack' : {
101
- type : 'aws:cloudformation:stack' ,
102
- environment : 'aws://unknown-account/unknown-region' ,
103
- properties : {
104
- templateFile : 'one-stack.template.json' ,
105
- validateOnSynth : false ,
106
- tags : {
107
- boomTag : 'BOOM' ,
108
- } ,
109
- } ,
110
- displayName : 'one-stack' ,
111
- metadata : {
112
- '/one-stack' : [
113
- {
114
- type : 'aws:cdk:stack-tags' ,
115
- data : [
116
- {
117
- key : 'boomTag' ,
118
- value : 'BOOM' ,
119
- } ,
120
- ] ,
121
- } ,
122
- ] ,
123
- } ,
124
- // no logicalId entry
125
- } ,
126
- } ,
127
- } ) ;
128
49
} ) ;
129
50
130
51
test ( 'single empty stack' , ( ) => {
@@ -137,6 +58,7 @@ describe('synthesis', () => {
137
58
138
59
// THEN
139
60
expect ( list ( session . directory ) . includes ( 'one-stack.template.json' ) ) . toEqual ( true ) ;
61
+
140
62
} ) ;
141
63
142
64
test ( 'some random construct implements "synthesize"' , ( ) => {
@@ -190,6 +112,7 @@ describe('synthesis', () => {
190
112
} ,
191
113
} ,
192
114
} ) ;
115
+
193
116
} ) ;
194
117
195
118
test ( 'random construct uses addCustomSynthesis' , ( ) => {
@@ -249,6 +172,7 @@ describe('synthesis', () => {
249
172
} ,
250
173
} ,
251
174
} ) ;
175
+
252
176
} ) ;
253
177
254
178
testDeprecated ( 'it should be possible to synthesize without an app' , ( ) => {
@@ -296,6 +220,7 @@ describe('synthesis', () => {
296
220
expect ( stack . templateFile ) . toEqual ( 'hey.json' ) ;
297
221
expect ( stack . parameters ) . toEqual ( { paramId : 'paramValue' , paramId2 : 'paramValue2' } ) ;
298
222
expect ( stack . environment ) . toEqual ( { region : 'us-east-1' , account : 'unknown-account' , name : 'aws://unknown-account/us-east-1' } ) ;
223
+
299
224
} ) ;
300
225
} ) ;
301
226
0 commit comments