File tree 2 files changed +20
-8
lines changed
2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ interface SynthConfig extends CommonSynthConfig {
22
22
type SynthOutputConfig = {
23
23
stacks : SynthesizedStack [ ] ;
24
24
} ;
25
- export const SynthOutput = ( { stacks } : SynthOutputConfig ) : React . ReactElement => {
25
+ export const SynthOutput = ( {
26
+ stacks,
27
+ } : SynthOutputConfig ) : React . ReactElement => {
26
28
return (
27
29
< Text >
28
30
{ stacks ?. length
Original file line number Diff line number Diff line change @@ -9,16 +9,26 @@ import { stripAnsi } from "../test-helper";
9
9
import { SynthOutput } from "../../bin/cmds/ui/synth" ;
10
10
import { SynthesizedStack } from "@cdktf/cli-core" ;
11
11
12
- test ( "SynthOutput" , ( ) => {
13
- const { lastFrame } = render ( < React . Fragment > < SynthOutput stacks = { [ ] } /> </ React . Fragment > ) ;
12
+ test ( "SynthOutput" , ( ) => {
13
+ const { lastFrame } = render (
14
+ < React . Fragment >
15
+ < SynthOutput stacks = { [ ] } />
16
+ </ React . Fragment >
17
+ ) ;
14
18
expect ( stripAnsi ( lastFrame ( ) ) ) . toBe ( "No stacks found in configuration." ) ;
15
19
{
16
20
const multipleStacks = [
17
21
{ name : "stack1" } ,
18
- { name : "stack2" }
22
+ { name : "stack2" } ,
19
23
] as SynthesizedStack [ ] ;
20
-
21
- const { lastFrame } = render ( < React . Fragment > < SynthOutput stacks = { multipleStacks } /> </ React . Fragment > ) ;
22
- expect ( stripAnsi ( lastFrame ( ) ) ) . toBe ( "Generated Terraform code for the stacks: stack1, stack2" ) ;
24
+
25
+ const { lastFrame } = render (
26
+ < React . Fragment >
27
+ < SynthOutput stacks = { multipleStacks } />
28
+ </ React . Fragment >
29
+ ) ;
30
+ expect ( stripAnsi ( lastFrame ( ) ) ) . toBe (
31
+ "Generated Terraform code for the stacks: stack1, stack2"
32
+ ) ;
23
33
}
24
- } )
34
+ } ) ;
You can’t perform that action at this time.
0 commit comments