From 6930a2f5211009e1f4137b5403da11ecbc7baf81 Mon Sep 17 00:00:00 2001 From: fisker Date: Sat, 15 Feb 2020 18:12:31 +0800 Subject: [PATCH] Add false tests --- tests/src/core/importType.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/src/core/importType.js b/tests/src/core/importType.js index 6de32168d5..400c96b967 100644 --- a/tests/src/core/importType.js +++ b/tests/src/core/importType.js @@ -227,8 +227,13 @@ describe('importType(name)', function () { it('`isExternalModule` works with windows directory separator', function() { expect(isExternalModule('foo', {}, 'E:\\path\\to\\node_modules\\foo')).to.equal(true) + expect(isExternalModule('foo', {}, '.\\foo')).to.equal(false) + expect(isExternalModule('foo', { 'import/external-module-folders': ['E:\\path\\to\\node_modules'], }, 'E:\\path\\to\\node_modules\\foo')).to.equal(true) + expect(isExternalModule('foo', { + 'import/external-module-folders': ['E:\\path\\to\\node_modules'], + }, '.\\foo')).to.equal(false) }) })