@@ -33,8 +33,6 @@ afterEach(() => {
33
33
34
34
describe ( 'CLI options testing' , ( ) => {
35
35
test ( 'generation with `config.example.js`' , async ( ) => {
36
- jest . setTimeout ( 10000 ) ;
37
-
38
36
const out = await cli ( [ `./config.example.js` ] , __dirname ) ;
39
37
40
38
expect ( out ) . toEqual ( {
46
44
} ) ;
47
45
48
46
expect ( fs . readFileSync ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ) . toMatchSnapshot ( ) ;
49
- } ) ;
47
+ } , 25000 ) ;
50
48
51
49
test ( 'paths are relative to configfile, not to cwd' , async ( ) => {
52
- jest . setTimeout ( 10000 ) ;
53
-
54
50
const out = await cli ( [ `../test/config.example.js` ] , path . resolve ( __dirname , '../src' ) ) ;
55
51
56
52
expect ( out ) . toEqual ( {
62
58
} ) ;
63
59
64
60
expect ( fs . readFileSync ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ) . toMatchSnapshot ( ) ;
65
- } ) ;
61
+ } , 25000 ) ;
66
62
67
63
test ( 'ts, js and json all work the same' , async ( ) => {
68
- jest . setTimeout ( 25000 ) ;
69
-
70
64
await cli ( [ `./config.example.js` ] , __dirname ) ;
71
65
const fromJs = fs . readFileSync ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ;
72
66
await cli ( [ `./config.example.ts` ] , __dirname ) ;
76
70
77
71
expect ( fromTs ) . toEqual ( fromJs ) ;
78
72
expect ( fromJson ) . toEqual ( fromJs ) ;
79
- } ) ;
73
+ } , 25000 ) ;
80
74
81
75
test ( 'missing parameters doesnt fail' , async ( ) => {
82
- jest . setTimeout ( 25000 ) ;
83
-
84
76
const out = await cli ( [ `./config.invalid-example.json` ] , __dirname ) ;
85
- expect ( out . stderr ) . toContain ( "Error: path parameter petId does not seem to be defined in '/pet/{petId}'!" )
86
- } ) ;
77
+ expect ( out . stderr ) . toContain ( "Error: path parameter petId does not seem to be defined in '/pet/{petId}'!" ) ;
78
+ } , 25000 ) ;
87
79
} ) ;
0 commit comments