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 Apr 6, 2017
1 parent 98e7048 commit 65fd4c9
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 @@ -60,6 +60,7 @@
"eslint-import-resolver-node": "file:./resolvers/node",
"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 @@ -29,6 +29,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 65fd4c9

Please sign in to comment.