@@ -4,6 +4,8 @@ import path from 'node:path'
4
4
import { tryFile } from '@pkgr/core'
5
5
import { exec } from 'tinyexec'
6
6
7
+ const TIMEOUT = 30_000
8
+
7
9
describe ( 'e2e cases' , async ( ) => {
8
10
const { dirname } = import . meta
9
11
@@ -26,31 +28,35 @@ describe('e2e cases', async () => {
26
28
} )
27
29
}
28
30
29
- it ( 'should exec eslint successfully' , async ( ) => {
30
- const eslintConfig = tryFile ( 'eslint.config.js' , false , absoluteDir )
31
- expect (
32
- await exec (
33
- 'yarn' ,
34
- [
35
- 'eslint' ,
36
- ...( eslintConfig
37
- ? [ '-c' , eslintConfig ]
38
- : [ '--ignore-pattern' , '!.dot' ] ) ,
39
- '--ext' ,
40
- 'cjs,cts,js,jsx,mjs,mts,ts,tsx' ,
41
- '--report-unused-disable-directives' ,
42
- absoluteDir ,
43
- ] ,
44
- {
45
- nodeOptions : {
46
- env : {
47
- ESLINT_USE_FLAT_CONFIG : eslintConfig ? undefined : 'false' ,
48
- NODE_OPTIONS : '--no-warnings=ESLintRCWarning' ,
31
+ it (
32
+ `should exec eslint successfully > ${ dirName } ` ,
33
+ async ( ) => {
34
+ const eslintConfig = tryFile ( 'eslint.config.js' , false , absoluteDir )
35
+ expect (
36
+ await exec (
37
+ 'yarn' ,
38
+ [
39
+ 'eslint' ,
40
+ ...( eslintConfig
41
+ ? [ '-c' , eslintConfig ]
42
+ : [ '--ignore-pattern' , '!.dot' ] ) ,
43
+ '--ext' ,
44
+ 'cjs,cts,js,jsx,mjs,mts,ts,tsx' ,
45
+ '--report-unused-disable-directives' ,
46
+ absoluteDir ,
47
+ ] ,
48
+ {
49
+ nodeOptions : {
50
+ env : {
51
+ ESLINT_USE_FLAT_CONFIG : eslintConfig ? undefined : 'false' ,
52
+ NODE_OPTIONS : '--no-warnings=ESLintRCWarning' ,
53
+ } ,
49
54
} ,
50
55
} ,
51
- } ,
52
- ) ,
53
- ) . toMatchSnapshot ( dirName )
54
- } )
56
+ ) ,
57
+ ) . toMatchSnapshot ( )
58
+ } ,
59
+ TIMEOUT ,
60
+ )
55
61
}
56
62
} )
0 commit comments