Skip to content

Commit

Permalink
no-restricted-paths: complete coverage
Browse files Browse the repository at this point in the history
=
  • Loading branch information
benmosher committed May 17, 2018
1 parent e6f5c13 commit ebafcbf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/src/rules/no-restricted-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ ruleTester.run('no-restricted-paths', rule, {
zones: [ { target: './tests/files/restricted-paths/client', from: './tests/files/restricted-paths/other' } ],
} ],
}),


// irrelevant function calls
test({ code: 'notrequire("../server/b.js")' }),
test({
code: 'notrequire("../server/b.js")',
filename: testFilePath('./restricted-paths/client/a.js'),
options: [ {
zones: [ { target: './tests/files/restricted-paths/client', from: './tests/files/restricted-paths/server' } ],
} ], }),

// no config
test({ code: 'require("../server/b.js")' }),
test({ code: 'import b from "../server/b.js"' }),

// builtin (ignore)
test({ code: 'require("os")' })
],

invalid: [
Expand Down

0 comments on commit ebafcbf

Please sign in to comment.