Skip to content

Commit 840bb41

Browse files
committed
feat(#44): uses direct tests for the CLI, instead of redirecting through execa
1 parent 08ec67a commit 840bb41

File tree

3 files changed

+192
-78
lines changed

3 files changed

+192
-78
lines changed
Lines changed: 82 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,82 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`create can select a nested property 1`] = `"{\\"b\\":{\\"c\\":true}}"`;
3+
exports[`create can select a nested property 1`] = `
4+
"{\\"b\\":{\\"c\\":true}}
5+
"
6+
`;
47

5-
exports[`create can select a nested property 2`] = `"{\\"c\\":true}"`;
8+
exports[`create can select a nested property 2`] = `
9+
"{\\"c\\":true}
10+
"
11+
`;
612

7-
exports[`create can select a nested property 3`] = `"true"`;
13+
exports[`create can select a nested property 3`] = `
14+
"true
15+
"
16+
`;
817

9-
exports[`create prints JSON format 1`] = `"{\\"foo\\":true}"`;
18+
exports[`create prints JSON format 1`] = `
19+
"{\\"foo\\":true}
20+
"
21+
`;
1022

11-
exports[`create prints JSON5 format 1`] = `"{foo:true}"`;
23+
exports[`create prints JSON5 format 1`] = `
24+
"{foo:true}
25+
"
26+
`;
1227

1328
exports[`create prints TOML format 1`] = `
1429
"foo = true
30+
1531
"
1632
`;
1733

1834
exports[`create prints YAML format 1`] = `
1935
"foo: true
36+
2037
"
2138
`;
2239

23-
exports[`create prints raw format 1`] = `"true"`;
40+
exports[`create prints raw format 1`] = `
41+
"true
42+
"
43+
`;
2444

25-
exports[`create prints raw format 2`] = `"83.2"`;
45+
exports[`create prints raw format 2`] = `
46+
"83.2
47+
"
48+
`;
2649

27-
exports[`create prints raw format 3`] = `"foo"`;
50+
exports[`create prints raw format 3`] = `
51+
"foo
52+
"
53+
`;
2854

2955
exports[`create prints simple app-config file 1`] = `
3056
"foo: true
57+
3158
"
3259
`;
3360

34-
exports[`create uses environmentOverride option 1`] = `"APP_CONFIG_VAL=42"`;
61+
exports[`create uses environmentOverride option 1`] = `
62+
"APP_CONFIG_VAL=42
63+
"
64+
`;
3565

36-
exports[`create uses environmentOverride option 2`] = `"APP_CONFIG_VAL=88"`;
66+
exports[`create uses environmentOverride option 2`] = `
67+
"APP_CONFIG_VAL=88
68+
"
69+
`;
3770

3871
exports[`create uses environmentVariableName option 1`] = `
3972
"foo: true
73+
4074
"
4175
`;
4276

4377
exports[`create uses fileNameBase option 1`] = `
4478
"foo: bar
79+
4580
"
4681
`;
4782

@@ -50,6 +85,7 @@ exports[`create-schema can select a nested property 1`] = `
5085
properties:
5186
foo:
5287
type: boolean
88+
5389
"
5490
`;
5591

@@ -58,19 +94,27 @@ exports[`create-schema can select a nested property 2`] = `
5894
properties:
5995
bar:
6096
type: boolean
97+
6198
"
6299
`;
63100

64-
exports[`create-schema prints JSON format 1`] = `"{\\"type\\":\\"object\\",\\"properties\\":{\\"foo\\":{\\"type\\":\\"boolean\\"}},\\"$schema\\":\\"http://json-schema.org/draft-07/schema#\\"}"`;
101+
exports[`create-schema prints JSON format 1`] = `
102+
"{\\"type\\":\\"object\\",\\"properties\\":{\\"foo\\":{\\"type\\":\\"boolean\\"}},\\"$schema\\":\\"http://json-schema.org/draft-07/schema#\\"}
103+
"
104+
`;
65105

66-
exports[`create-schema prints JSON5 format 1`] = `"{type:'object',properties:{foo:{type:'boolean'}},$schema:'http://json-schema.org/draft-07/schema#'}"`;
106+
exports[`create-schema prints JSON5 format 1`] = `
107+
"{type:'object',properties:{foo:{type:'boolean'}},$schema:'http://json-schema.org/draft-07/schema#'}
108+
"
109+
`;
67110

68111
exports[`create-schema prints TOML format 1`] = `
69112
"type = \\"object\\"
70113
\\"$schema\\" = \\"http://json-schema.org/draft-07/schema#\\"
71114
72115
[properties.foo]
73116
type = \\"boolean\\"
117+
74118
"
75119
`;
76120

@@ -80,6 +124,7 @@ properties:
80124
foo:
81125
type: boolean
82126
$schema: 'http://json-schema.org/draft-07/schema#'
127+
83128
"
84129
`;
85130

@@ -89,25 +134,43 @@ properties:
89134
foo:
90135
type: boolean
91136
$schema: 'http://json-schema.org/draft-07/schema#'
137+
92138
"
93139
`;
94140

95141
exports[`vars aliases a variable 1`] = `
96142
"APP_CONFIG_FOO=true
97-
BAR=true"
143+
BAR=true
144+
"
98145
`;
99146

100-
exports[`vars filters list of variables with --only 1`] = `"FOO=true"`;
147+
exports[`vars filters list of variables with --only 1`] = `
148+
"FOO=true
149+
"
150+
`;
101151

102-
exports[`vars prints only nonSecrets without --secrets option 1`] = `"APP_CONFIG_NON_SECRET=true"`;
152+
exports[`vars prints only nonSecrets without --secrets option 1`] = `
153+
"APP_CONFIG_NON_SECRET=true
154+
"
155+
`;
103156

104157
exports[`vars prints only nonSecrets without --secrets option 2`] = `
105158
"APP_CONFIG_SECRET=true
106-
APP_CONFIG_NON_SECRET=true"
159+
APP_CONFIG_NON_SECRET=true
160+
"
107161
`;
108162

109-
exports[`vars prints simple app-config file 1`] = `"APP_CONFIG_FOO=true"`;
163+
exports[`vars prints simple app-config file 1`] = `
164+
"APP_CONFIG_FOO=true
165+
"
166+
`;
110167

111-
exports[`vars renames a variable 1`] = `"BAR=true"`;
168+
exports[`vars renames a variable 1`] = `
169+
"BAR=true
170+
"
171+
`;
112172

113-
exports[`vars uses provided environment variable prefix 1`] = `"MY_CONFIG_FOO=true"`;
173+
exports[`vars uses provided environment variable prefix 1`] = `
174+
"MY_CONFIG_FOO=true
175+
"
176+
`;

0 commit comments

Comments
 (0)