Skip to content

Commit 0251b73

Browse files
committed
autoformat node manual tests
1 parent 2accab9 commit 0251b73

File tree

6 files changed

+15
-20
lines changed

6 files changed

+15
-20
lines changed

packages/node/test/manual/memory-leak/context-memory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ for (let i = 0; i < 10000; i++) {
2020

2121
console.log(process.memoryUsage());
2222

23-
setInterval(function() {
23+
setInterval(function () {
2424
console.log(process.memoryUsage());
2525
}, 1000);

packages/node/test/manual/memory-leak/express-patient.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ const nock = require('nock');
88

99
// have to call this for each request :/ ref https://github.com/node-nock/nock#read-this---about-interceptors
1010
function nockRequest() {
11-
nock('https://app.getsentry.com')
12-
.filteringRequestBody(/.*/, '*')
13-
.post(/.*/, '*')
14-
.reply(200, 'OK');
11+
nock('https://app.getsentry.com').filteringRequestBody(/.*/, '*').post(/.*/, '*').reply(200, 'OK');
1512
}
1613

1714
const memwatch = require('memwatch-next');
18-
memwatch.on('stats', function(stats) {
15+
memwatch.on('stats', function (stats) {
1916
process._rawDebug(
2017
util.format(
2118
'gc #%d: min %d, max %d, est base %d, curr base %d',
@@ -71,12 +68,10 @@ app.get('/breadcrumbs/auto/console', (req, res, next) => {
7168
});
7269

7370
app.get('/breadcrumbs/auto/http', (req, res, next) => {
74-
const scope = nock('http://www.example.com')
75-
.get('/hello')
76-
.reply(200, 'hello world');
71+
const scope = nock('http://www.example.com').get('/hello').reply(200, 'hello world');
7772

7873
http
79-
.get('http://www.example.com/hello', function(nockRes) {
74+
.get('http://www.example.com/hello', function (nockRes) {
8075
scope.done();
8176
res.textToSend = 'hello there! we got hello world from example.com';
8277
next();
@@ -96,8 +91,8 @@ app.get('/gc', (req, res, next) => {
9691
});
9792

9893
app.get('/shutdown', (req, res, next) => {
99-
setTimeout(function() {
100-
server.close(function() {
94+
setTimeout(function () {
95+
server.close(function () {
10196
process.exit();
10297
});
10398
}, 100);

packages/node/test/manual/memory-leak/manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function startChild() {
2424
child = child_process.spawn('node', [serverPath]);
2525
child.stdout.pipe(process.stdout);
2626
child.stderr.pipe(process.stderr);
27-
child.on('exit', function() {
27+
child.on('exit', function () {
2828
console.log('child exited');
2929
startChild();
3030
});

packages/node/test/manual/release-health/session-aggregates/aggregates-disable-single-session.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function cleanUpAndExitSuccessfully() {
1313
function assertSessionAggregates(session, expected) {
1414
// For loop is added here just in the rare occasion that the session count do not land in the same aggregate
1515
// bucket
16-
session.aggregates.forEach(function(_, idx) {
16+
session.aggregates.forEach(function (_, idx) {
1717
delete session.aggregates[idx].started;
1818
// Session Aggregates keys need to be ordered for JSON.stringify comparison
1919
const ordered = Object.keys(session.aggregates[idx])

packages/node/test/manual/release-health/single-session/terminal-state-sessions-sent-once.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ Sentry.init({
4141
* However we want to ensure that once a crashed terminal state is achieved, no more session updates are sent regardless
4242
* of whether more crashes happen or not
4343
*/
44-
new Promise(function(resolve, reject) {
44+
new Promise(function (resolve, reject) {
4545
reject();
46-
}).then(function() {
46+
}).then(function () {
4747
console.log('Promise Resolved');
4848
});
4949

50-
new Promise(function(resolve, reject) {
50+
new Promise(function (resolve, reject) {
5151
reject();
52-
}).then(function() {
52+
}).then(function () {
5353
console.log('Promise Resolved');
5454
});

packages/node/test/manual/release-health/single-session/unhandled-rejection-crashed-session.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Sentry.init({
4242
* extracts event data and uses it to update the Session and sends it. The second session update is sent on the
4343
* `beforeExit` event which happens right before the process exits.
4444
*/
45-
new Promise(function(resolve, reject) {
45+
new Promise(function (resolve, reject) {
4646
reject();
47-
}).then(function() {
47+
}).then(function () {
4848
console.log('Promise Resolved');
4949
});

0 commit comments

Comments
 (0)