Skip to content

Commit 12d6786

Browse files
committed
fix: fixed review comments
- fix breadcrumbStore field TSDoc in catcher - destroy BrowserBreadcrumbStore instance before each tests
1 parent 8df48ec commit 12d6786

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

packages/javascript/src/catcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class Catcher {
122122
private readonly consoleCatcher: ConsoleCatcher | null = null;
123123

124124
/**
125-
* Breadcrumb manager instance
125+
* Breadcrumb store instance
126126
*/
127127
private readonly breadcrumbStore: BrowserBreadcrumbStore | null;
128128

packages/javascript/tests/breadcrumbs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as core from '@hawk.so/core';
55

66
function resetManager(): void {
77
// eslint-disable-next-line @typescript-eslint/no-explicit-any
8-
(BrowserBreadcrumbStore as any).instance = null;
8+
(BrowserBreadcrumbStore as any).instance?.destroy();
99
}
1010

1111
describe('BrowserBreadcrumbStore', () => {

packages/javascript/tests/catcher.addons.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Catcher', () => {
1111
beforeEach(() => {
1212
localStorage.clear();
1313
mockParse.mockResolvedValue([]);
14-
(BrowserBreadcrumbStore as any).instance = null;
14+
(BrowserBreadcrumbStore as any).instance?.destroy();
1515
});
1616

1717
// ── Environment addons ────────────────────────────────────────────────────

packages/javascript/tests/catcher.breadcrumbs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Catcher', () => {
1111
beforeEach(() => {
1212
localStorage.clear();
1313
mockParse.mockResolvedValue([]);
14-
(BrowserBreadcrumbStore as any).instance = null;
14+
(BrowserBreadcrumbStore as any).instance?.destroy();
1515
});
1616

1717
// ── Breadcrumbs trail ─────────────────────────────────────────────────────

packages/javascript/tests/catcher.context.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Catcher', () => {
1111
beforeEach(() => {
1212
localStorage.clear();
1313
mockParse.mockResolvedValue([]);
14-
(BrowserBreadcrumbStore as any).instance = null;
14+
(BrowserBreadcrumbStore as any).instance?.destroy();
1515
});
1616

1717
// ── Context enrichment ────────────────────────────────────────────────────

packages/javascript/tests/catcher.global-handlers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Catcher', () => {
1212
beforeEach(() => {
1313
localStorage.clear();
1414
mockParse.mockResolvedValue([]);
15-
(BrowserBreadcrumbStore as any).instance = null;
15+
(BrowserBreadcrumbStore as any).instance?.destroy();
1616
});
1717

1818
// ── Global error handlers ─────────────────────────────────────────────────

packages/javascript/tests/catcher.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('Catcher', () => {
1717
beforeEach(() => {
1818
localStorage.clear();
1919
mockParse.mockResolvedValue([]);
20-
(BrowserBreadcrumbStore as any).instance = null;
20+
(BrowserBreadcrumbStore as any).instance?.destroy();
2121
});
2222

2323
// ── Constructor variants ──────────────────────────────────────────────────

packages/javascript/tests/catcher.transport.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Catcher', () => {
1212
beforeEach(() => {
1313
localStorage.clear();
1414
mockParse.mockResolvedValue([]);
15-
(BrowserBreadcrumbStore as any).instance = null;
15+
(BrowserBreadcrumbStore as any).instance?.destroy();
1616
});
1717

1818
describe('transport failure', () => {

packages/javascript/tests/catcher.user.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Catcher', () => {
1111
beforeEach(() => {
1212
localStorage.clear();
1313
mockParse.mockResolvedValue([]);
14-
(BrowserBreadcrumbStore as any).instance = null;
14+
(BrowserBreadcrumbStore as any).instance?.destroy();
1515
});
1616

1717
// ── User identity ─────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)