1 | var readInstalled = require('../read-installed.js')
|
2 | var test = require('tap').test
|
3 | var path = require('path');
|
4 |
|
5 | function allValid(t, map) {
|
6 | var deps = Object.keys(map.dependencies || {})
|
7 | deps.forEach(function (dep) {
|
8 | t.ok(map.dependencies[dep].extraneous, 'dependency ' + dep + ' of ' + map.name + ' is extraneous')
|
9 | })
|
10 | }
|
11 |
|
12 | test('grandparent dev peer dependencies should be extraneous', function(t) {
|
13 | readInstalled(
|
14 | path.join(__dirname, 'fixtures/grandparent-peer-dev'),
|
15 | { log: console.error },
|
16 | function(err, map) {
|
17 | allValid(t, map)
|
18 | t.end()
|
19 | })
|
20 | })
|