@@ -4,6 +4,8 @@ import path from 'node:path'
44import { tryFile } from '@pkgr/core'
55import { exec } from 'tinyexec'
66
7+ const TIMEOUT = 30_000
8+
79describe ( 'e2e cases' , async ( ) => {
810 const { dirname } = import . meta
911
@@ -26,31 +28,35 @@ describe('e2e cases', async () => {
2628 } )
2729 }
2830
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+ } ,
4954 } ,
5055 } ,
51- } ,
52- ) ,
53- ) . toMatchSnapshot ( dirName )
54- } )
56+ ) ,
57+ ) . toMatchSnapshot ( )
58+ } ,
59+ TIMEOUT ,
60+ )
5561 }
5662} )
0 commit comments