@@ -14,39 +14,55 @@ describe("CLI", () => {
14
14
[
15
15
"snapshot > GitHub API" ,
16
16
{
17
- given : "./examples/github-api.yaml" ,
17
+ given : [ "./examples/github-api.yaml" ] ,
18
18
want : new URL ( "./examples/github-api.ts" , root ) ,
19
19
ci : { timeout : TIMEOUT } ,
20
20
} ,
21
21
] ,
22
+ [
23
+ "snapshot > GitHub API (immutable)" ,
24
+ {
25
+ given : [ "./examples/github-api.yaml" , "--immutable" ] ,
26
+ want : new URL ( "./examples/github-api-immutable.ts" , root ) ,
27
+ ci : { timeout : TIMEOUT } ,
28
+ } ,
29
+ ] ,
30
+ [
31
+ "snapshot > GitHub API (types + immutable)" ,
32
+ {
33
+ given : [ "./examples/github-api.yaml" , "--immutable" , "--export-type" ] ,
34
+ want : new URL ( "./examples/github-api-export-type-immutable.ts" , root ) ,
35
+ ci : { timeout : TIMEOUT } ,
36
+ } ,
37
+ ] ,
22
38
[
23
39
"snapshot > GitHub API (next)" ,
24
40
{
25
- given : "./examples/github-api-next.yaml" ,
41
+ given : [ "./examples/github-api-next.yaml" ] ,
26
42
want : new URL ( "./examples/github-api-next.ts" , root ) ,
27
43
ci : { timeout : TIMEOUT } ,
28
44
} ,
29
45
] ,
30
46
[
31
47
"snapshot > Octokit GHES 3.6 Diff to API" ,
32
48
{
33
- given : "./examples/octokit-ghes-3.6-diff-to-api.json" ,
49
+ given : [ "./examples/octokit-ghes-3.6-diff-to-api.json" ] ,
34
50
want : new URL ( "./examples/octokit-ghes-3.6-diff-to-api.ts" , root ) ,
35
51
ci : { timeout : TIMEOUT } ,
36
52
} ,
37
53
] ,
38
54
[
39
55
"snapshot > Stripe API" ,
40
56
{
41
- given : "./examples/stripe-api.yaml" ,
57
+ given : [ "./examples/stripe-api.yaml" ] ,
42
58
want : new URL ( "./examples/stripe-api.ts" , root ) ,
43
59
ci : { timeout : TIMEOUT } ,
44
60
} ,
45
61
] ,
46
62
[
47
63
"snapshot > DigitalOcean" ,
48
64
{
49
- given : "./examples/digital-ocean-api/DigitalOcean-public.v2.yaml" ,
65
+ given : [ "./examples/digital-ocean-api/DigitalOcean-public.v2.yaml" ] ,
50
66
want : new URL ( "./examples/digital-ocean-api.ts" , root ) ,
51
67
ci : { timeout : TIMEOUT } ,
52
68
} ,
@@ -57,7 +73,7 @@ describe("CLI", () => {
57
73
test . skipIf ( ci ?. skipIf ) (
58
74
testName ,
59
75
async ( ) => {
60
- const { stdout } = await execa ( cmd , [ given ] , { cwd } ) ;
76
+ const { stdout } = await execa ( cmd , given , { cwd } ) ;
61
77
if ( want instanceof URL ) {
62
78
expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( want ) ) ;
63
79
} else {
0 commit comments