File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ test('bad json', async () => {
3535 input : 'bad-json.js' ,
3636 plugins : [ dataUri ( ) ]
3737 } ) ;
38- const error = await fn ( ) . then ( ( ) => null , ( caught ) => caught ) ;
38+ const error = await fn ( ) . then (
39+ ( ) => null ,
40+ ( caught ) => caught
41+ ) ;
3942 expect ( error ) . not . toBeNull ( ) ;
4043 const { code, plugin, pluginCode } = error ;
4144 expect ( { code, plugin, pluginCode } ) . toMatchSnapshot ( ) ;
Original file line number Diff line number Diff line change @@ -206,28 +206,24 @@ test('works with cjs plugin', async () => {
206206 expect ( count ) . toBe ( 1 ) ;
207207} ) ;
208208
209- test (
210- 'works with flat config' ,
211- async ( ) => {
212- let count = 0 ;
213- await rollup ( {
214- input : './test/fixtures/flat-config/undeclared.js' ,
215- plugins : [
216- eslint ( {
217- formatter : ( results ) => {
218- count += results [ 0 ] . messages . length ;
219- // eslint-disable-next-line prefer-destructuring
220- const { message } = results [ 0 ] . messages [ 0 ] ;
221- expect ( message ) . toBe ( "'x' is not defined." ) ;
222- }
223- } )
224- ]
225- } ) ;
209+ test ( 'works with flat config' , async ( ) => {
210+ let count = 0 ;
211+ await rollup ( {
212+ input : './test/fixtures/flat-config/undeclared.js' ,
213+ plugins : [
214+ eslint ( {
215+ formatter : ( results ) => {
216+ count += results [ 0 ] . messages . length ;
217+ // eslint-disable-next-line prefer-destructuring
218+ const { message } = results [ 0 ] . messages [ 0 ] ;
219+ expect ( message ) . toBe ( "'x' is not defined." ) ;
220+ }
221+ } )
222+ ]
223+ } ) ;
226224
227- expect ( count ) . toBe ( 1 ) ;
228- } ,
229- 15_000
230- ) ;
225+ expect ( count ) . toBe ( 1 ) ;
226+ } , 15_000 ) ;
231227
232228test ( 'works with ESLint v9' , async ( ) => {
233229 // Load the plugin with an override to route 'eslint' imports to ESLint v9
You can’t perform that action at this time.
0 commit comments