Skip to content

Commit

Permalink
[Tests] named: Run all TypeScript tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ProdigySim authored and ljharb committed Apr 7, 2022
1 parent d160285 commit 6436e36
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange

## [Unreleased]

### Changed
- [Tests] `named`: Run all TypeScript test ([#2427], thanks [@ProdigySim])

## [2.26.0] - 2022-04-05

### Added
Expand Down Expand Up @@ -977,6 +980,7 @@ for info on changes for earlier releases.

[`memo-parser`]: ./memo-parser/README.md

[#2427]: https://github.com/import-js/eslint-plugin-import/pull/2427
[#2417]: https://github.com/import-js/eslint-plugin-import/pull/2417
[#2411]: https://github.com/import-js/eslint-plugin-import/pull/2411
[#2393]: https://github.com/import-js/eslint-plugin-import/pull/2393
Expand Down Expand Up @@ -1624,6 +1628,7 @@ for info on changes for earlier releases.
[@Pessimistress]: https://github.com/Pessimistress
[@pmcelhaney]: https://github.com/pmcelhaney
[@preco21]: https://github.com/preco21
[@ProdigySim]: https://github.com/ProdigySim
[@pzhine]: https://github.com/pzhine
[@ramasilveyra]: https://github.com/ramasilveyra
[@randallreedjr]: https://github.com/randallreedjr
Expand Down
21 changes: 15 additions & 6 deletions tests/src/rules/named.js
Expand Up @@ -390,12 +390,16 @@ context('TypeScript', function () {

const valid = [];
const invalid = [
test({
code: `import {a} from './export-star-3/b';`,
filename: testFilePath('./export-star-3/a.js'),
parser,
settings,
}),
// TODO: uncomment this test
// test({
// code: `import {a} from './export-star-3/b';`,
// filename: testFilePath('./export-star-3/a.js'),
// parser,
// settings,
// errors: [
// { message: 'a not found in ./export-star-3/b' },
// ],
// }),
];

[
Expand Down Expand Up @@ -469,5 +473,10 @@ context('TypeScript', function () {
}),
);
});

ruleTester.run(`named [TypeScript]`, rule, {
valid,
invalid,
});
});
});

0 comments on commit 6436e36

Please sign in to comment.