From a5eef516a793b01f3eed2e8586fe7e459142ee42 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Tue, 21 Mar 2017 10:53:17 -0300 Subject: [PATCH] Fix indent in api-crash-reporter-spec.js --- spec/api-crash-reporter-spec.js | 132 ++++++++++++++++---------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/spec/api-crash-reporter-spec.js b/spec/api-crash-reporter-spec.js index 41910d6228a8..dc4b98150160 100644 --- a/spec/api-crash-reporter-spec.js +++ b/spec/api-crash-reporter-spec.js @@ -16,83 +16,83 @@ describe('crashReporter module', function () { } var fixtures = path.resolve(__dirname, 'fixtures') const generateSpecs = (description, browserWindowOpts) => { - describe(description, function () { - var w = null - var originalTempDirectory = null - var tempDirectory = null + describe(description, function () { + var w = null + var originalTempDirectory = null + var tempDirectory = null - beforeEach(function () { - w = new BrowserWindow(Object.assign({ - show: false - }, browserWindowOpts)) - tempDirectory = temp.mkdirSync('electronCrashReporterSpec-') - originalTempDirectory = app.getPath('temp') - app.setPath('temp', tempDirectory) - }) + beforeEach(function () { + w = new BrowserWindow(Object.assign({ + show: false + }, browserWindowOpts)) + tempDirectory = temp.mkdirSync('electronCrashReporterSpec-') + originalTempDirectory = app.getPath('temp') + app.setPath('temp', tempDirectory) + }) - afterEach(function () { - app.setPath('temp', originalTempDirectory) - return closeWindow(w).then(function () { w = null }) - }) + afterEach(function () { + app.setPath('temp', originalTempDirectory) + return closeWindow(w).then(function () { w = null }) + }) - it('should send minidump when renderer crashes', function (done) { - if (process.env.APPVEYOR === 'True') return done() - if (process.env.TRAVIS === 'true') return done() + it('should send minidump when renderer crashes', function (done) { + if (process.env.APPVEYOR === 'True') return done() + if (process.env.TRAVIS === 'true') return done() - this.timeout(120000) + this.timeout(120000) - startServer({ - callback (port) { - const crashUrl = url.format({ - protocol: 'file', - pathname: path.join(fixtures, 'api', 'crash.html'), - search: '?port=' + port + startServer({ + callback (port) { + const crashUrl = url.format({ + protocol: 'file', + pathname: path.join(fixtures, 'api', 'crash.html'), + search: '?port=' + port + }) + w.loadURL(crashUrl) + }, + processType: 'renderer', + done: done }) - w.loadURL(crashUrl) - }, - processType: 'renderer', - done: done - }) - }) + }) - it('should send minidump when node processes crash', function (done) { - if (process.env.APPVEYOR === 'True') return done() - if (process.env.TRAVIS === 'true') return done() + it('should send minidump when node processes crash', function (done) { + if (process.env.APPVEYOR === 'True') return done() + if (process.env.TRAVIS === 'true') return done() - this.timeout(120000) + this.timeout(120000) - startServer({ - callback (port) { - const crashesDir = path.join(app.getPath('temp'), `${app.getName()} Crashes`) - const version = app.getVersion() - const crashPath = path.join(fixtures, 'module', 'crash.js') - childProcess.fork(crashPath, [port, version, crashesDir], {silent: true}) - }, - processType: 'browser', - done: done - }) - }) - - it('should send minidump with updated extra parameters', function (done) { - if (process.env.APPVEYOR === 'True') return done() - if (process.env.TRAVIS === 'true') return done() - - this.timeout(10000) - - startServer({ - callback (port) { - const crashUrl = url.format({ - protocol: 'file', - pathname: path.join(fixtures, 'api', 'crash-restart.html'), - search: '?port=' + port + startServer({ + callback (port) { + const crashesDir = path.join(app.getPath('temp'), `${app.getName()} Crashes`) + const version = app.getVersion() + const crashPath = path.join(fixtures, 'module', 'crash.js') + childProcess.fork(crashPath, [port, version, crashesDir], {silent: true}) + }, + processType: 'browser', + done: done }) - w.loadURL(crashUrl) - }, - processType: 'renderer', - done: done + }) + + it('should send minidump with updated extra parameters', function (done) { + if (process.env.APPVEYOR === 'True') return done() + if (process.env.TRAVIS === 'true') return done() + + this.timeout(10000) + + startServer({ + callback (port) { + const crashUrl = url.format({ + protocol: 'file', + pathname: path.join(fixtures, 'api', 'crash-restart.html'), + search: '?port=' + port + }) + w.loadURL(crashUrl) + }, + processType: 'renderer', + done: done + }) + }) }) - }) - }) } generateSpecs('without sandbox', {})