Skip to content

Commit 2002452

Browse files
committed
Format
1 parent ac70ed0 commit 2002452

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

packages/telemetry/src/api.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ describe('Top level API', () => {
156156
strAttr: 'string attribute',
157157
mapAttr: {
158158
boolAttr: true,
159-
numAttr: 2,
159+
numAttr: 2
160160
},
161-
arrAttr: [1, 2, 3],
161+
arrAttr: [1, 2, 3]
162162
});
163163

164164
expect(emittedLogs.length).to.equal(1);
@@ -169,9 +169,9 @@ describe('Top level API', () => {
169169
strAttr: 'string attribute',
170170
mapAttr: {
171171
boolAttr: true,
172-
numAttr: 2,
172+
numAttr: 2
173173
},
174-
arrAttr: [1, 2, 3],
174+
arrAttr: [1, 2, 3]
175175
});
176176
});
177177
});

packages/telemetry/src/next/index.test.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('onRequestError', () => {
5252
const errorRequest = {
5353
path: '/test-path?some=param',
5454
method: 'GET',
55-
headers: {},
55+
headers: {}
5656
};
5757
const errorContext: {
5858
routerKind: 'Pages Router';
@@ -63,22 +63,18 @@ describe('onRequestError', () => {
6363
routerKind: 'Pages Router',
6464
routePath: '/test-path',
6565
routeType: 'render',
66-
revalidateReason: undefined,
66+
revalidateReason: undefined
6767
};
6868

6969
await onRequestError(error, errorRequest, errorContext);
7070

7171
expect(getTelemetryStub).to.have.been.calledOnceWith(fakeApp);
72-
expect(captureErrorStub).to.have.been.calledOnceWith(
73-
fakeTelemetry,
74-
error,
75-
{
76-
'nextjs_path': '/test-path?some=param',
77-
'nextjs_method': 'GET',
78-
'nextjs_router_kind': 'Pages Router',
79-
'nextjs_route_path': '/test-path',
80-
'nextjs_route_type': 'render'
81-
}
82-
);
72+
expect(captureErrorStub).to.have.been.calledOnceWith(fakeTelemetry, error, {
73+
'nextjs_path': '/test-path?some=param',
74+
'nextjs_method': 'GET',
75+
'nextjs_router_kind': 'Pages Router',
76+
'nextjs_route_path': '/test-path',
77+
'nextjs_route_type': 'render'
78+
});
8379
});
8480
});

0 commit comments

Comments
 (0)