summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/config-malformed.js
blob: 0d859e00340f339249bf06217a8d3184a15e4410 (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('../common-config.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()
  })
})