@@ -84,7 +84,7 @@ describe("CLI", () => {
84
84
async ( ) => {
85
85
const { stdout } = await execa ( cmd , given , { cwd, stripFinalNewline : false } ) ;
86
86
if ( want instanceof URL ) {
87
- expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( want ) ) ;
87
+ await expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( want ) ) ;
88
88
} else {
89
89
expect ( stdout ) . toBe ( `${ want } \n` ) ;
90
90
}
@@ -98,7 +98,7 @@ describe("CLI", () => {
98
98
async ( ) => {
99
99
const input = fs . readFileSync ( new URL ( "./examples/stripe-api.yaml" , root ) ) ;
100
100
const { stdout } = await execa ( cmd , { input, cwd, stripFinalNewline : false } ) ;
101
- expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( new URL ( "./examples/stripe-api.ts" , root ) ) ) ;
101
+ await expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( new URL ( "./examples/stripe-api.ts" , root ) ) ) ;
102
102
} ,
103
103
TIMEOUT ,
104
104
) ;
@@ -121,7 +121,7 @@ describe("CLI", () => {
121
121
cwd,
122
122
stripFinalNewline : false ,
123
123
} ) ;
124
- expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( new URL ( "./examples/github-api-required.ts" , root ) ) ) ;
124
+ await expect ( stdout ) . toMatchFileSnapshot ( fileURLToPath ( new URL ( "./examples/github-api-required.ts" , root ) ) ) ;
125
125
} ,
126
126
TIMEOUT ,
127
127
) ;
@@ -135,7 +135,7 @@ describe("CLI", () => {
135
135
cwd : fileURLToPath ( cwd ) ,
136
136
} ) ;
137
137
for ( const schema of [ "a" , "b" , "c" ] ) {
138
- expect ( fs . readFileSync ( new URL ( `./output/${ schema } .ts` , cwd ) , "utf8" ) ) . toMatchFileSnapshot (
138
+ await expect ( fs . readFileSync ( new URL ( `./output/${ schema } .ts` , cwd ) , "utf8" ) ) . toMatchFileSnapshot (
139
139
fileURLToPath ( new URL ( "../../../examples/simple-example.ts" , cwd ) ) ,
140
140
) ;
141
141
}
@@ -146,7 +146,7 @@ describe("CLI", () => {
146
146
cwd,
147
147
} ) ;
148
148
for ( const schema of [ "a" , "b" , "c" ] ) {
149
- expect (
149
+ await expect (
150
150
fs . readFileSync ( new URL ( `./test/fixtures/redocly-flag/output/${ schema } .ts` , root ) , "utf8" ) ,
151
151
) . toMatchFileSnapshot ( fileURLToPath ( new URL ( "./examples/simple-example.ts" , root ) ) ) ;
152
152
}
0 commit comments