@@ -388,14 +388,18 @@ context('TypeScript', function () {
388388 'import/resolver' : { 'eslint-import-resolver-typescript' : true } ,
389389 } ;
390390
391- const valid = [ ] ;
391+ let valid = [ ] ;
392392 const invalid = [
393- test ( {
394- code : `import {a} from './export-star-3/b';` ,
395- filename : testFilePath ( './export-star-3/a.js' ) ,
396- parser,
397- settings,
398- } ) ,
393+ // TODO: uncomment this test
394+ // test({
395+ // code: `import {a} from './export-star-3/b';`,
396+ // filename: testFilePath('./export-star-3/a.js'),
397+ // parser,
398+ // settings,
399+ // errors: [
400+ // { message: 'a not found in ./export-star-3/b' },
401+ // ],
402+ // }),
399403 ] ;
400404
401405 [
@@ -404,7 +408,7 @@ context('TypeScript', function () {
404408 'typescript-export-assign-namespace' ,
405409 'typescript-export-assign-namespace-merged' ,
406410 ] . forEach ( ( source ) => {
407- valid . push (
411+ valid = valid . concat (
408412 test ( {
409413 code : `import { MyType } from "./${ source } "` ,
410414 parser,
@@ -420,11 +424,18 @@ context('TypeScript', function () {
420424 parser,
421425 settings,
422426 } ) ,
423- test ( {
424- code : `import { getFoo } from "./${ source } "` ,
425- parser,
426- settings,
427- } ) ,
427+ ( source === 'typescript-declare'
428+ ? testVersion ( '> 5' , ( ) => ( {
429+ code : `import { getFoo } from "./${ source } "` ,
430+ parser,
431+ settings,
432+ } ) )
433+ : test ( {
434+ code : `import { getFoo } from "./${ source } "` ,
435+ parser,
436+ settings,
437+ } )
438+ ) ,
428439 test ( {
429440 code : `import { MyEnum } from "./${ source } "` ,
430441 parser,
@@ -469,5 +480,10 @@ context('TypeScript', function () {
469480 } ) ,
470481 ) ;
471482 } ) ;
483+
484+ ruleTester . run ( `named [TypeScript]` , rule , {
485+ valid,
486+ invalid,
487+ } ) ;
472488 } ) ;
473489} ) ;
0 commit comments