UNPKG

585 BJavaScriptView Raw
1var readInstalled = require('../read-installed.js')
2var test = require('tap').test
3var path = require('path');
4
5function 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
12test('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})