spec: Use multiparty instead of formidable
The latter is buggy and affects our specs.
This commit is contained in:
Родитель
751af25f37
Коммит
05611f5e60
|
@ -3,7 +3,7 @@ path = require 'path'
|
|||
http = require 'http'
|
||||
url = require 'url'
|
||||
remote = require 'remote'
|
||||
formidable = require 'formidable'
|
||||
multiparty = require 'multiparty'
|
||||
|
||||
crashReporter = remote.require 'crash-reporter'
|
||||
BrowserWindow = remote.require 'browser-window'
|
||||
|
@ -26,10 +26,8 @@ describe 'crash-reporter module', ->
|
|||
@timeout 120000
|
||||
server = http.createServer (req, res) ->
|
||||
server.close()
|
||||
form = new formidable.IncomingForm()
|
||||
process.throwDeprecation = false
|
||||
form = new multiparty.Form()
|
||||
form.parse req, (error, fields, files) ->
|
||||
process.throwDeprecation = true
|
||||
assert.equal fields['prod'], 'Electron'
|
||||
assert.equal fields['ver'], process.versions['electron']
|
||||
assert.equal fields['process_type'], 'renderer'
|
||||
|
@ -39,7 +37,6 @@ describe 'crash-reporter module', ->
|
|||
assert.equal fields['_productName'], 'Zombies'
|
||||
assert.equal fields['_companyName'], 'Umbrella Corporation'
|
||||
assert.equal fields['_version'], require('remote').require('app').getVersion()
|
||||
assert files['upload_file_minidump']['name']?
|
||||
|
||||
res.end('abc-123-def')
|
||||
done()
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"version": "0.1.0",
|
||||
"devDependencies": {
|
||||
"basic-auth": "^1.0.0",
|
||||
"formidable": "1.0.16",
|
||||
"multiparty": "4.1.2",
|
||||
"graceful-fs": "3.0.5",
|
||||
"mocha": "2.1.0",
|
||||
"q": "0.9.7",
|
||||
|
|
|
@ -9,6 +9,7 @@ process.port = 0; // will be used by crash-reporter spec.
|
|||
|
||||
app.commandLine.appendSwitch('js-flags', '--expose_gc');
|
||||
app.commandLine.appendSwitch('ignore-certificate-errors');
|
||||
app.commandLine.appendSwitch('disable-renderer-backgrounding');
|
||||
|
||||
// Accessing stdout in the main process will result in the process.stdout
|
||||
// throwing UnknownSystemError in renderer process sometimes. This line makes
|
||||
|
|
Загрузка…
Ссылка в новой задаче