Skip to content

Commit 5a40033

Browse files
committed
fix tests
1 parent a1c88ff commit 5a40033

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/replay/test/integration/coreHandlers/handleScope.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ describe('Integration | coreHandlers | handleScope', () => {
2323

2424
expect(mockHandleScopeListener).toHaveBeenCalledTimes(1);
2525

26-
getCurrentHub().getScope()?.addBreadcrumb({ message: 'testing' });
26+
getCurrentHub().getScope()?.addBreadcrumb({ category: 'console', message: 'testing' });
2727

2828
expect(mockHandleScope).toHaveBeenCalledTimes(1);
29-
expect(mockHandleScope).toHaveReturnedWith(expect.objectContaining({ message: 'testing' }));
29+
expect(mockHandleScope).toHaveReturnedWith(expect.objectContaining({ category: 'console', message: 'testing' }));
3030

3131
mockHandleScope.mockClear();
3232

packages/replay/test/unit/coreHandlers/handleScope.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ describe('Unit | coreHandlers | handleScope', () => {
6363

6464
describe('normalizeConsoleBreadcrumb', () => {
6565
it('handles console messages with no arguments', () => {
66-
const breadcrumb: Breadcrumb = { category: 'console', message: 'test' };
66+
const breadcrumb = { category: 'console', message: 'test' };
6767
const actual = HandleScope.normalizeConsoleBreadcrumb(breadcrumb);
6868

6969
expect(actual).toMatchObject({ category: 'console', message: 'test' });
7070
});
7171

7272
it('handles console messages with empty arguments', () => {
73-
const breadcrumb: Breadcrumb = { category: 'console', message: 'test', data: { arguments: [] } };
73+
const breadcrumb = { category: 'console', message: 'test', data: { arguments: [] } };
7474
const actual = HandleScope.normalizeConsoleBreadcrumb(breadcrumb);
7575

7676
expect(actual).toMatchObject({ category: 'console', message: 'test', data: { arguments: [] } });
7777
});
7878

7979
it('handles console messages with simple arguments', () => {
80-
const breadcrumb: Breadcrumb = {
80+
const breadcrumb = {
8181
category: 'console',
8282
message: 'test',
8383
data: { arguments: [1, 'a', true, null, undefined] },
@@ -94,7 +94,7 @@ describe('Unit | coreHandlers | handleScope', () => {
9494
});
9595

9696
it('truncates large strings', () => {
97-
const breadcrumb: Breadcrumb = {
97+
const breadcrumb = {
9898
category: 'console',
9999
message: 'test',
100100
data: {
@@ -114,7 +114,7 @@ describe('Unit | coreHandlers | handleScope', () => {
114114
});
115115

116116
it('truncates large JSON objects', () => {
117-
const breadcrumb: Breadcrumb = {
117+
const breadcrumb = {
118118
category: 'console',
119119
message: 'test',
120120
data: {

0 commit comments

Comments
 (0)