Welcome to mirror list, hosted at ThFree Co, Russian Federation.

type-description.js « test « config « workspaces - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d487c118940ecd73a7d480f14f539412155e50c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const t = require('tap')
const typeDescription = require('../lib/type-description.js')
const types = require('./fixtures/types.js')
const descriptions = {}
for (const [name, type] of Object.entries(types)) {
  const desc = typeDescription(type)
  if (name === 'local-address') {
    t.strictSame(desc.sort(), type.filter(t => t !== undefined).sort())
  } else {
    descriptions[name] = desc
  }
}

t.matchSnapshot(descriptions)