throw error if it exists

This commit is contained in:
Zeke Sikelianos 2016-03-28 16:33:16 -07:00 committed by Kevin Sawicki
parent c5f70c8d99
commit 14fb3c4598

View file

@ -40,9 +40,8 @@ describe('crash-reporter module', function () {
server.close()
var form = new multiparty.Form()
form.parse(req, function (error, fields) {
if (called) {
return
}
if (error) throw error
if (called) return
called = true
assert.equal(fields['prod'], 'Electron')
assert.equal(fields['ver'], process.versions['electron'])