Skip to content

Commit c9a16c2

Browse files
authored
Merge pull request #69 from dependents/bump_deps
Bump deps for dynamic import support
2 parents 3904ccf + 95e4117 commit c9a16c2

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"commander": "^2.6.0",
3939
"debug": "^2.2.0",
4040
"filing-cabinet": "^1.9.0",
41-
"precinct": "^3.7.0"
41+
"precinct": "^3.8.0"
4242
},
4343
"devDependencies": {
4444
"babel": "~5.8.38",

test/test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,31 @@ describe('dependencyTree', function() {
831831
});
832832
});
833833

834+
describe('when given an es6 file using dynamic imports', function() {
835+
beforeEach(function() {
836+
mockfs({
837+
[__dirname + '/es6']: {
838+
'foo.js': 'import("./bar");',
839+
'bar.js': 'export default 1;'
840+
}
841+
});
842+
});
843+
844+
it('includes the dynamic import', function() {
845+
const directory = __dirname + '/es6';
846+
const filename = directory + '/foo.js';
847+
848+
const tree = dependencyTree({
849+
filename,
850+
directory
851+
});
852+
853+
const subTree = tree[filename];
854+
855+
assert.ok(!(`${directory}/bar.js` in subTree));
856+
});
857+
});
858+
834859
describe('Config', function() {
835860
describe('when cloning', function() {
836861
describe('and a detective config was set', function() {

0 commit comments

Comments
 (0)