1var test = require('tap').test 2 3var npmconf = require('../../lib/config/core.js') 4var common = require('../common-config.js') 5 6test('with malformed', function (t) { 7 npmconf.load({}, common.malformed, function (er, conf) { 8 t.ok(er, 'Expected parse error') 9 if (!(er && /Failed parsing JSON config key email/.test(er.message))) { 10 throw er 11 } 12 t.end() 13 }) 14}) 15