From f63a4a05b79c063bc81ebd75fc66ae4904c3a758 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 11 Nov 2015 10:37:01 +0800 Subject: [PATCH] spec: Make the crash-reporter test more reliable --- spec/api-crash-reporter-spec.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/api-crash-reporter-spec.coffee b/spec/api-crash-reporter-spec.coffee index 5e06cade8cec..6232edfd3b6c 100644 --- a/spec/api-crash-reporter-spec.coffee +++ b/spec/api-crash-reporter-spec.coffee @@ -24,10 +24,15 @@ describe 'crash-reporter module', -> it 'should send minidump when renderer crashes', (done) -> @timeout 120000 + called = false server = http.createServer (req, res) -> server.close() form = new multiparty.Form() form.parse req, (error, fields, files) -> + # This callback can be called for twice sometimes. + return if called + called = true + assert.equal fields['prod'], 'Electron' assert.equal fields['ver'], process.versions['electron'] assert.equal fields['process_type'], 'renderer'