From 14fb3c4598a919d58c641b4ded5d55e2888a962f Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Mon, 28 Mar 2016 16:33:16 -0700 Subject: [PATCH] throw error if it exists --- spec/api-crash-reporter-spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/api-crash-reporter-spec.js b/spec/api-crash-reporter-spec.js index 708daeab956..2e49fdc36c5 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'])