Check the upload parameters in crash-reporter spec.
This commit is contained in:
parent
cdb5e24d2f
commit
bd0836581b
2 changed files with 12 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
|||
"mocha": "~1.13.0",
|
||||
"walkdir": "~0.0.7",
|
||||
|
||||
"formidable": "~1.0.14",
|
||||
"unzip": "~0.1.9",
|
||||
"d3": "~3.3.8",
|
||||
"int64-native": "~0.2.0"
|
||||
|
|
|
@ -2,6 +2,7 @@ assert = require 'assert'
|
|||
path = require 'path'
|
||||
http = require 'http'
|
||||
remote = require 'remote'
|
||||
formidable = require 'formidable'
|
||||
BrowserWindow = remote.require 'browser-window'
|
||||
|
||||
fixtures = path.resolve __dirname, '..', 'fixtures'
|
||||
|
@ -10,6 +11,13 @@ describe 'crash-reporter module', ->
|
|||
it 'should send minidump when renderer crashes', (done) ->
|
||||
w = new BrowserWindow(show: false)
|
||||
server = http.createServer (req, res) ->
|
||||
form = new formidable.IncomingForm()
|
||||
form.parse req, (error, fields, files) ->
|
||||
assert.equal fields['atom_shell_version'], process.versions['atom-shell']
|
||||
assert.equal fields['process_type'], 'renderer'
|
||||
assert.equal files['upload_file_minidump']['name'], 'minidump.dmp'
|
||||
|
||||
w.destroy()
|
||||
res.end()
|
||||
server.close()
|
||||
done()
|
||||
|
|
Loading…
Reference in a new issue