Skip to content

Commit fa28a1c

Browse files
committed
fix tests again
1 parent 9c1518f commit fa28a1c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

packages/feedback/test/widget/createWidget.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('createWidget', () => {
130130
});
131131

132132
(sendFeedbackRequest as jest.Mock).mockImplementation(() => {
133-
return Promise.resolve(true);
133+
return Promise.resolve({ statusCode: 200 });
134134
});
135135
widget.actor?.el?.dispatchEvent(new Event('click'));
136136

@@ -180,7 +180,7 @@ describe('createWidget', () => {
180180
});
181181

182182
(sendFeedbackRequest as jest.Mock).mockImplementation(() => {
183-
return true;
183+
return Promise.resolve({ statusCode: 200 });
184184
});
185185
widget.actor?.el?.dispatchEvent(new Event('click'));
186186

packages/profiling-node/test/hubextensions.hub.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('hubextensions', () => {
9696
// eslint-disable-next-line deprecation/deprecation
9797
hub.bindClient(client);
9898

99-
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
99+
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve({}));
100100

101101
// eslint-disable-next-line deprecation/deprecation
102102
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub' });
@@ -133,7 +133,7 @@ describe('hubextensions', () => {
133133
};
134134
});
135135

136-
jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
136+
jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve({}));
137137

138138
// eslint-disable-next-line deprecation/deprecation
139139
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub' });
@@ -181,7 +181,7 @@ describe('hubextensions', () => {
181181
};
182182
});
183183

184-
jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
184+
jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve({}));
185185

186186
// eslint-disable-next-line deprecation/deprecation
187187
const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub', traceId: 'boop' });
@@ -203,7 +203,7 @@ describe('hubextensions', () => {
203203
const startProfilingSpy = jest.spyOn(CpuProfilerBindings, 'startProfiling');
204204
const stopProfilingSpy = jest.spyOn(CpuProfilerBindings, 'stopProfiling');
205205

206-
jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
206+
jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve({}));
207207

208208
// eslint-disable-next-line deprecation/deprecation
209209
const transaction = hub.startTransaction({ name: 'profile_hub' });
@@ -223,7 +223,7 @@ describe('hubextensions', () => {
223223
// eslint-disable-next-line deprecation/deprecation
224224
hub.bindClient(client);
225225

226-
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
226+
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve({}));
227227

228228
// eslint-disable-next-line deprecation/deprecation
229229
const transaction = hub.startTransaction({ name: 'profile_hub' });
@@ -274,7 +274,7 @@ describe('hubextensions', () => {
274274
// Emit is sync, so we can just assert that we got here
275275
const transportSpy = jest.spyOn(transport, 'send').mockImplementation(() => {
276276
// Do nothing so we don't send events to Sentry
277-
return Promise.resolve();
277+
return Promise.resolve({});
278278
});
279279

280280
// eslint-disable-next-line deprecation/deprecation
@@ -346,7 +346,7 @@ describe('hubextensions', () => {
346346

347347
const transportSpy = jest.spyOn(transport, 'send').mockImplementation(() => {
348348
// Do nothing so we don't send events to Sentry
349-
return Promise.resolve();
349+
return Promise.resolve({});
350350
});
351351

352352
// eslint-disable-next-line deprecation/deprecation
@@ -439,7 +439,7 @@ describe('hubextensions', () => {
439439
// eslint-disable-next-line deprecation/deprecation
440440
hub.bindClient(client);
441441

442-
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve());
442+
const transportSpy = jest.spyOn(transport, 'send').mockReturnValue(Promise.resolve({}));
443443

444444
// eslint-disable-next-line deprecation/deprecation
445445
const transaction = hub.startTransaction({ name: 'profile_hub' });

0 commit comments

Comments
 (0)