Skip to content

Commit f751bd6

Browse files
committed
Add test for "depth"-parameter
1 parent 73788b7 commit f751bd6

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
size: 24k... with-dependencies: 56k
2+
├── dep1@1.0.0, 16k, 1 deps
3+
└── dep2@1.0.0, 16k, 1 deps

test/index-spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@ describe('The index-function (module main function):', function () {
1818
expect(result).to.equal(fs.readFileSync('test/fixtures/moduleWithDeps.txt', 'utf-8'))
1919
})
2020
})
21+
22+
it('should cut the display at a specific depth if specified', function () {
23+
return analyze('test/fixtures/moduleWithDeps', {depth: 1})
24+
.then((result) => {
25+
expect(result).to.equal(fs.readFileSync('test/fixtures/moduleWithDeps-depth1.txt', 'utf-8'))
26+
})
27+
})
28+
2129
})

0 commit comments

Comments
 (0)