File tree Expand file tree Collapse file tree 2 files changed +498
-0
lines changed Expand file tree Collapse file tree 2 files changed +498
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,15 @@ describe("cli", () => {
34
34
expect ( generated . toString ( "utf8" ) ) . to . equal ( expected ) ;
35
35
} ) ;
36
36
37
+ it ( "stdin" , async ( ) => {
38
+ execSync ( `${ cmd } - -o generated/stdin.ts < ./specs/petstore.yaml` , {
39
+ cwd,
40
+ } ) ;
41
+ const generated = fs . readFileSync ( new URL ( "./generated/stdin.ts" , cwd ) , "utf8" ) ;
42
+ const expected = eol . lf ( fs . readFileSync ( new URL ( "./expected/stdin.ts" , cwd ) , "utf8" ) ) ;
43
+ expect ( generated ) . to . equal ( expected ) ;
44
+ } ) ;
45
+
37
46
it ( "supports glob paths" , async ( ) => {
38
47
execSync ( `${ cmd } "specs/*.yaml" -o generated/` , { cwd } ) ; // Quotes are necessary because shells like zsh treats glob weirdly
39
48
const generatedPetstore = fs . readFileSync ( new URL ( "./generated/specs/petstore.ts" , cwd ) , "utf8" ) ;
You can’t perform that action at this time.
0 commit comments