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

config-malformed.js « tap « test - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0450221462193fbdd0fc7f140652adeadb5be3b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var test = require('tap').test

var npmconf = require("../../lib/config/core.js")
var common = require("./00-config-setup.js")

test('with malformed', function (t) {
  npmconf.load({}, common.malformed, function (er, conf) {
    t.ok(er, 'Expected parse error')
    if (!(er && /Failed parsing JSON config key email/.test(er.message))) {
      throw er
    }
    t.end()
  })
})