Skip to content

Commit

Permalink
Added static import & require and for bad filepath test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tapayne88 committed Jul 23, 2020
1 parent 305f33c commit 300a5b3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/src/rules/no-relative-packages.js
Expand Up @@ -24,6 +24,18 @@ ruleTester.run('no-relative-packages', rule, {
code: 'const bar = require("../bar.js")',
filename: testFilePath('./package/index.js'),
}),
test({
code: 'const bar = require("../not/a/file/path.js")',
filename: testFilePath('./package/index.js'),
}),
test({
code: 'import "package"',
filename: testFilePath('./package/index.js'),
}),
test({
code: 'require("../bar.js")',
filename: testFilePath('./package/index.js'),
}),
],

invalid: [
Expand Down

0 comments on commit 300a5b3

Please sign in to comment.