diff --git a/tests/src/rules/no-restricted-paths.js b/tests/src/rules/no-restricted-paths.js index 88cc8ad15..13f8472cb 100644 --- a/tests/src/rules/no-restricted-paths.js +++ b/tests/src/rules/no-restricted-paths.js @@ -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: [