@@ -32,14 +32,13 @@ describe('CLI options testing', () => {
32
32
if ( ! ( await isDir ( tmpDir ) ) ) {
33
33
await fs . mkdir ( tmpDir , { recursive : true } ) ;
34
34
}
35
- return removeTempDir ;
36
35
} ) ;
37
36
38
37
afterEach ( async ( ) => {
39
38
await rimraf ( `${ tmpDir } /*.ts` , { glob : true } ) ;
40
39
} ) ;
41
40
42
- test ( 'generation with `config.example.js`' , async ( ) => {
41
+ test ( 'generation with `config.example.js`' , { timeout : 25_000 } , async ( ) => {
43
42
const out = await cli ( [ './test/config.example.js' ] ) ;
44
43
45
44
expect ( out ) . toEqual ( {
50
49
} ) ;
51
50
52
51
expect ( await fs . readFile ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ) . toMatchSnapshot ( ) ;
53
- } , 25_000 ) ;
52
+ } ) ;
54
53
55
- test ( 'paths are relative to config file, not to cwd' , async ( ) => {
54
+ test ( 'paths are relative to config file, not to cwd' , { timeout : 25_000 } , async ( ) => {
56
55
const out = await cli ( [ `./test/config.example.js` ] ) ;
57
56
58
57
expect ( out ) . toEqual ( {
63
62
} ) ;
64
63
65
64
expect ( await fs . readFile ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ) . toMatchSnapshot ( ) ;
66
- } , 25_000 ) ;
65
+ } ) ;
67
66
68
- test ( 'ts, js and json all work the same' , async ( ) => {
67
+ test ( 'ts, js and json all work the same' , { timeout : 120_000 } , async ( ) => {
69
68
await cli ( [ `./test/config.example.js` ] ) ;
70
69
const fromJs = await fs . readFile ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ;
71
70
await cli ( [ `./test/config.example.ts` ] ) ;
75
74
76
75
expect ( fromTs ) . toEqual ( fromJs ) ;
77
76
expect ( fromJson ) . toEqual ( fromJs ) ;
78
- } , 120_000 ) ;
77
+ } ) ;
79
78
80
- test ( "missing parameters doesn't fail" , async ( ) => {
79
+ test ( "missing parameters doesn't fail" , { timeout : 25_000 } , async ( ) => {
81
80
await expect ( ( ) => cli ( [ `./test/config.invalid-example.json` ] ) ) . rejects . toThrowError (
82
81
"Error: path parameter petId does not seem to be defined in '/pet/{petId}'!"
83
82
) ;
84
- } , 25_000 ) ;
83
+ } ) ;
85
84
} ) ;
0 commit comments