@@ -32,14 +32,13 @@ describe('CLI options testing', () => {
3232 if ( ! ( await isDir ( tmpDir ) ) ) {
3333 await fs . mkdir ( tmpDir , { recursive : true } ) ;
3434 }
35- return removeTempDir ;
3635 } ) ;
3736
3837 afterEach ( async ( ) => {
3938 await rimraf ( `${ tmpDir } /*.ts` , { glob : true } ) ;
4039 } ) ;
4140
42- test ( 'generation with `config.example.js`' , async ( ) => {
41+ test ( 'generation with `config.example.js`' , { timeout : 25_000 } , async ( ) => {
4342 const out = await cli ( [ './test/config.example.js' ] ) ;
4443
4544 expect ( out ) . toEqual ( {
5049 } ) ;
5150
5251 expect ( await fs . readFile ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ) . toMatchSnapshot ( ) ;
53- } , 25_000 ) ;
52+ } ) ;
5453
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 ( ) => {
5655 const out = await cli ( [ `./test/config.example.js` ] ) ;
5756
5857 expect ( out ) . toEqual ( {
6362 } ) ;
6463
6564 expect ( await fs . readFile ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ) . toMatchSnapshot ( ) ;
66- } , 25_000 ) ;
65+ } ) ;
6766
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 ( ) => {
6968 await cli ( [ `./test/config.example.js` ] ) ;
7069 const fromJs = await fs . readFile ( path . resolve ( tmpDir , 'example.ts' ) , 'utf-8' ) ;
7170 await cli ( [ `./test/config.example.ts` ] ) ;
7574
7675 expect ( fromTs ) . toEqual ( fromJs ) ;
7776 expect ( fromJson ) . toEqual ( fromJs ) ;
78- } , 120_000 ) ;
77+ } ) ;
7978
80- test ( "missing parameters doesn't fail" , async ( ) => {
79+ test ( "missing parameters doesn't fail" , { timeout : 25_000 } , async ( ) => {
8180 await expect ( ( ) => cli ( [ `./test/config.invalid-example.json` ] ) ) . rejects . toThrowError (
8281 "Error: path parameter petId does not seem to be defined in '/pet/{petId}'!"
8382 ) ;
84- } , 25_000 ) ;
83+ } ) ;
8584} ) ;
0 commit comments