Disable use of deprecated functions in specs.

This commit is contained in:
Cheng Zhao 2013-12-15 17:02:43 +08:00
parent 474e1fcd3b
commit cd68396bd5
2 changed files with 5 additions and 0 deletions

View file

@ -13,7 +13,9 @@ describe 'crash-reporter module', ->
w = new BrowserWindow(show: false) w = new BrowserWindow(show: false)
server = http.createServer (req, res) -> server = http.createServer (req, res) ->
form = new formidable.IncomingForm() form = new formidable.IncomingForm()
process.throwDeprecation = false
form.parse req, (error, fields, files) -> form.parse req, (error, fields, files) ->
process.throwDeprecation = true
assert.equal fields['prod'], 'Atom-Shell' assert.equal fields['prod'], 'Atom-Shell'
assert.equal fields['ver'], process.versions['atom-shell'] assert.equal fields['ver'], process.versions['atom-shell']
assert.equal fields['process_type'], 'renderer' assert.equal fields['process_type'], 'renderer'

View file

@ -10,6 +10,9 @@
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
(function() { (function() {
// Disable use of deprecated functions.
process.throwDeprecation = true;
// Check if we are running in CI. // Check if we are running in CI.
var argv = require('remote').process.argv; var argv = require('remote').process.argv;
var isCi = argv[1] == '--ci'; var isCi = argv[1] == '--ci';