Skip to content

Commit

Permalink
Add unit tests to reproduce issue import-js#793
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys committed Aug 24, 2018
1 parent df2d526 commit dbd69dd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"eslint-import-resolver-typescript": "^1.0.2",
"eslint-import-resolver-webpack": "file:./resolvers/webpack",
"eslint-module-utils": "file:./utils",
"eslint-import-test-order-redirect": "file:./tests/files/order-redirect",
"eslint-plugin-import": "2.x",
"gulp": "^3.9.0",
"gulp-babel": "6.1.2",
Expand Down
5 changes: 5 additions & 0 deletions tests/files/order-redirect/module/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "order-redirect-module",
"private": true,
"main": "../other-module/file.js"
}
Empty file.
5 changes: 5 additions & 0 deletions tests/files/order-redirect/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "eslint-import-test-order-redirect",
"version": "1.0.0",
"private": true
}
6 changes: 6 additions & 0 deletions tests/src/rules/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ ruleTester.run('order', rule, {
import sibling, {foo3} from './foo';
import index from './';`,
}),
// Importing a package which contains nothing but a package.json which resolves elsewhere
test({
code: `
import reduxSagaEffects from 'eslint-import-test-order-redirect/module';
import relParent1 from '../foo';`,
}),
// Multiple module of the same rank next to each other
test({
code: `
Expand Down

0 comments on commit dbd69dd

Please sign in to comment.