Browse Source

throw error if it exists

Zeke Sikelianos 9 years ago
parent
commit
14fb3c4598
1 changed files with 2 additions and 3 deletions
  1. 2 3
      spec/api-crash-reporter-spec.js

+ 2 - 3
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'])