Skip to content

Commit 4dda614

Browse files
committed
fix tests
1 parent b6ca6fa commit 4dda614

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/react-router/test/client/hydratedRouter.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ describe('instrumentHydratedRouter', () => {
3939
};
4040
(globalThis as any).__reactRouterDataRouter = mockRouter;
4141

42-
mockPageloadSpan = { updateName: vi.fn(), setAttribute: vi.fn() };
43-
mockNavigationSpan = { updateName: vi.fn(), setAttribute: vi.fn() };
42+
mockPageloadSpan = { updateName: vi.fn(), setAttributes: vi.fn() };
43+
mockNavigationSpan = { updateName: vi.fn(), setAttributes: vi.fn() };
4444

4545
(core.getActiveSpan as any).mockReturnValue(mockPageloadSpan);
4646
(core.getRootSpan as any).mockImplementation((span: any) => span);
@@ -66,7 +66,7 @@ describe('instrumentHydratedRouter', () => {
6666
it('updates pageload transaction name if needed', () => {
6767
instrumentHydratedRouter();
6868
expect(mockPageloadSpan.updateName).toHaveBeenCalled();
69-
expect(mockPageloadSpan.setAttribute).toHaveBeenCalled();
69+
expect(mockPageloadSpan.setAttributes).toHaveBeenCalled();
7070
});
7171

7272
it('creates navigation transaction on navigate', () => {
@@ -89,7 +89,7 @@ describe('instrumentHydratedRouter', () => {
8989
(core.getActiveSpan as any).mockReturnValue(mockNavigationSpan);
9090
callback(newState);
9191
expect(mockNavigationSpan.updateName).toHaveBeenCalled();
92-
expect(mockNavigationSpan.setAttribute).toHaveBeenCalled();
92+
expect(mockNavigationSpan.setAttributes).toHaveBeenCalled();
9393
});
9494

9595
it('does not update navigation transaction on state change to loading', () => {
@@ -106,6 +106,6 @@ describe('instrumentHydratedRouter', () => {
106106
(core.getActiveSpan as any).mockReturnValue(mockNavigationSpan);
107107
callback(newState);
108108
expect(mockNavigationSpan.updateName).not.toHaveBeenCalled();
109-
expect(mockNavigationSpan.setAttribute).not.toHaveBeenCalled();
109+
expect(mockNavigationSpan.setAttributes).not.toHaveBeenCalled();
110110
});
111111
});

0 commit comments

Comments
 (0)