Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Runs prettier on test/
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Aug 31, 2017
1 parent 1aab36f commit aaba68c
Show file tree
Hide file tree
Showing 13 changed files with 563 additions and 448 deletions.
4 changes: 2 additions & 2 deletions test/exit/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ var scope = nock('https://app.getsentry.com')

Raven.config(dsn).install();

process.on('exit', function () {
process.on('exit', function() {
scope.done();
console.log('exit test assertions complete');
});

setImmediate(function () {
setImmediate(function() {
throw new Error('derp');
});
4 changes: 2 additions & 2 deletions test/exit/capture_callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var scope = nock('https://app.getsentry.com')
.post('/api/269/store/', '*')
.reply(200, 'OK');

Raven.config(dsn).install(function (err, sendErr, eventId) {
Raven.config(dsn).install(function(err, sendErr, eventId) {
scope.done();
assert.equal(sendErr, null);
assert.ok(err instanceof Error);
Expand All @@ -18,6 +18,6 @@ Raven.config(dsn).install(function (err, sendErr, eventId) {
process.exit(20);
});

setImmediate(function () {
setImmediate(function() {
throw new Error('derp');
});
12 changes: 6 additions & 6 deletions test/exit/capture_with_second_domain_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ var scope = nock('https://app.getsentry.com')
Raven.config(dsn).install();

var uncaughts = 0;
process.on('uncaughtException', function () {
process.on('uncaughtException', function() {
uncaughts++;
});

process.on('exit', function () {
process.on('exit', function() {
scope.done();
assert.equal(uncaughts, 2);
console.log('exit test assertions complete');
});

setImmediate(function () {
setImmediate(function() {
throw new Error('derp');
});

Raven.context(function () {
process.domain.on('error', function () {
Raven.context(function() {
process.domain.on('error', function() {
uncaughts++;
});
setImmediate(function () {
setImmediate(function() {
throw new Error('herp');
});
});
8 changes: 4 additions & 4 deletions test/exit/capture_with_second_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ var scope = nock('https://app.getsentry.com')
Raven.config(dsn).install();

var uncaughts = 0;
process.on('uncaughtException', function () {
process.on('uncaughtException', function() {
uncaughts++;
});

process.on('exit', function () {
process.on('exit', function() {
scope.done();
assert.equal(uncaughts, 2);
console.log('exit test assertions complete');
});

setImmediate(function () {
setImmediate(function () {
setImmediate(function() {
setImmediate(function() {
throw new Error('herp');
});
throw new Error('derp');
Expand Down
6 changes: 3 additions & 3 deletions test/exit/domain_capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ var scope = nock('https://app.getsentry.com')

Raven.config(dsn).install();

process.on('exit', function () {
process.on('exit', function() {
scope.done();
console.log('exit test assertions complete');
});

Raven.context(function () {
setImmediate(function () {
Raven.context(function() {
setImmediate(function() {
throw new Error('derp');
});
});
6 changes: 3 additions & 3 deletions test/exit/domain_capture_callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var scope = nock('https://app.getsentry.com')
.post('/api/269/store/', '*')
.reply(200, 'OK');

Raven.config(dsn).install(function (err, sendErr, eventId) {
Raven.config(dsn).install(function(err, sendErr, eventId) {
scope.done();
assert.equal(sendErr, null);
assert.ok(err instanceof Error);
Expand All @@ -18,8 +18,8 @@ Raven.config(dsn).install(function (err, sendErr, eventId) {
process.exit(20);
});

Raven.context(function () {
setImmediate(function () {
Raven.context(function() {
setImmediate(function() {
throw new Error('derp');
});
});
10 changes: 5 additions & 5 deletions test/exit/domain_capture_with_second_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ Raven.config(dsn).install();

var uncaughts = 0;

process.on('exit', function () {
process.on('exit', function() {
scope.done();
assert.equal(uncaughts, 2);
console.log('exit test assertions complete');
});

Raven.context(function () {
process.domain.on('error', function () {
Raven.context(function() {
process.domain.on('error', function() {
uncaughts++;
});
setImmediate(function () {
setImmediate(function () {
setImmediate(function() {
setImmediate(function() {
throw new Error('herp');
});
throw new Error('derp');
Expand Down
8 changes: 4 additions & 4 deletions test/exit/domain_throw_on_send.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private@app.getsentry.com/269';

Raven.config(dsn).install(function (err, sendErr) {
Raven.config(dsn).install(function(err, sendErr) {
assert.ok(err instanceof Error);
assert.ok(sendErr instanceof Error);
assert.equal(err.message, 'derp');
Expand All @@ -12,12 +12,12 @@ Raven.config(dsn).install(function (err, sendErr) {
process.exit(20);
});

Raven.transport.send = function () {
Raven.transport.send = function() {
throw new Error('foo');
};

Raven.context(function () {
setImmediate(function () {
Raven.context(function() {
setImmediate(function() {
throw new Error('derp');
});
});
8 changes: 4 additions & 4 deletions test/exit/throw_on_fatal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ var scope = nock('https://app.getsentry.com')
.reply(200, 'OK');

Raven.disableConsoleAlerts();
Raven.config(dsn).install(function () {
setImmediate(function () {
Raven.config(dsn).install(function() {
setImmediate(function() {
throw new Error('fatal derp');
});
});

process.on('exit', function () {
process.on('exit', function() {
scope.done();
console.log('exit test assertions complete');
});

setImmediate(function () {
setImmediate(function() {
throw new Error('derp');
});
4 changes: 2 additions & 2 deletions test/exit/throw_on_send.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var Raven = require('../../');
var assert = require('assert');
var dsn = 'https://public:private@app.getsentry.com/269';

Raven.config(dsn).install(function (err, sendErr) {
Raven.config(dsn).install(function(err, sendErr) {
assert.ok(err instanceof Error);
assert.ok(sendErr instanceof Error);
assert.equal(err.message, 'derp');
Expand All @@ -12,7 +12,7 @@ Raven.config(dsn).install(function (err, sendErr) {
process.exit(20);
});

Raven.transport.send = function () {
Raven.transport.send = function() {
throw new Error('foo');
};

Expand Down
Loading

0 comments on commit aaba68c

Please sign in to comment.