Skip to content

Commit aa3c9a4

Browse files
committed
clarify spy variable name in node index tests
1 parent 1713eb6 commit aa3c9a4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

packages/node/test/index.test.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,16 @@ describe('SentryNode', () => {
7575
});
7676

7777
describe('breadcrumbs', () => {
78-
let s: jest.SpyInstance<void, [Event, EventHint?]>;
78+
let sendEventSpy: jest.SpyInstance<void, [Event, EventHint?]>;
7979

8080
beforeEach(() => {
81-
s = jest.spyOn(NodeClient.prototype, 'sendEvent').mockImplementation(async () => Promise.resolve({ code: 200 }));
81+
sendEventSpy = jest
82+
.spyOn(NodeClient.prototype, 'sendEvent')
83+
.mockImplementation(async () => Promise.resolve({ code: 200 }));
8284
});
8385

8486
afterEach(() => {
85-
s.mockRestore();
87+
sendEventSpy.mockRestore();
8688
});
8789

8890
test('record auto breadcrumbs', done => {
@@ -106,14 +108,16 @@ describe('SentryNode', () => {
106108
});
107109

108110
describe('capture', () => {
109-
let s: jest.SpyInstance<void, [Event, EventHint?]>;
111+
let sendEventSpy: jest.SpyInstance<void, [Event, EventHint?]>;
110112

111113
beforeEach(() => {
112-
s = jest.spyOn(NodeClient.prototype, 'sendEvent').mockImplementation(async () => Promise.resolve({ code: 200 }));
114+
sendEventSpy = jest
115+
.spyOn(NodeClient.prototype, 'sendEvent')
116+
.mockImplementation(async () => Promise.resolve({ code: 200 }));
113117
});
114118

115119
afterEach(() => {
116-
s.mockRestore();
120+
sendEventSpy.mockRestore();
117121
});
118122

119123
test('capture an exception', done => {

0 commit comments

Comments
 (0)