]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/read-installed/test/grandparent-peer.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / read-installed / test / grandparent-peer.js
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.notOk(map.dependencies[dep].invalid, 'dependency ' + dep + ' of ' + map.name + ' is not invalid')
9     t.notOk(typeof map.dependencies[dep] === 'string', 'dependency ' + dep + ' of ' + map.name + ' is not missing')
10   })
11   deps.forEach(function (dep) {
12     allValid(t, map.dependencies[dep])
13   })
14 }
15
16 test('grandparent can satisfy peer dependencies', function(t) {
17   readInstalled(
18     path.join(__dirname, 'fixtures/grandparent-peer'),
19     { log: console.error },
20     function(err, map) {
21       allValid(t, map)
22       t.end()
23     })
24 })