Skip to content

Commit

Permalink
[Tests] use resolve, an actual dep, instead of builtin-modules, a…
Browse files Browse the repository at this point in the history
…n erstwhile transitive dep
  • Loading branch information
ljharb committed Mar 3, 2019
1 parent b4bad0e commit 158cd80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/src/core/importType.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ describe('importType(name)', function () {
})

it("should return 'external' for module from 'node_modules' with default config", function() {
expect(importType('builtin-modules', context)).to.equal('external')
expect(importType('resolve', context)).to.equal('external')
})

it("should return 'internal' for module from 'node_modules' if 'node_modules' missed in 'external-module-folders'", function() {
const foldersContext = testContext({ 'import/external-module-folders': [] })
expect(importType('builtin-modules', foldersContext)).to.equal('internal')
expect(importType('resolve', foldersContext)).to.equal('internal')
})

it("should return 'external' for module from 'node_modules' if 'node_modules' contained in 'external-module-folders'", function() {
const foldersContext = testContext({ 'import/external-module-folders': ['node_modules'] })
expect(importType('builtin-modules', foldersContext)).to.equal('external')
expect(importType('resolve', foldersContext)).to.equal('external')
})
})

0 comments on commit 158cd80

Please sign in to comment.