diff --git a/spec/api-crash-reporter-spec.js b/spec/api-crash-reporter-spec.js index 708daeab956f..2e49fdc36c5c 100644 --- a/spec/api-crash-reporter-spec.js +++ b/spec/api-crash-reporter-spec.js @@ -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'])