Skip to content

Commit 9c87b49

Browse files
style: format tracking test
1 parent e75f0cb commit 9c87b49

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

utils/tracking.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,23 @@ describe('trackUser', () => {
118118

119119
expect(fetchMock).toHaveBeenCalledTimes(1);
120120
});
121-
it('reports format error for non-serializable JSON payload', () => {
122-
const consoleErrorMock = vi.spyOn(console, 'error').mockImplementation(() => {});
123-
const fetchMock = vi.fn();
124-
vi.stubGlobal('fetch', fetchMock);
121+
it('reports format error for non-serializable JSON payload', () => {
122+
const consoleErrorMock = vi.spyOn(console, 'error').mockImplementation(() => {});
123+
const fetchMock = vi.fn();
124+
vi.stubGlobal('fetch', fetchMock);
125125

126-
const payload: Record<string, unknown> = {};
127-
payload.self = payload;
126+
const payload: Record<string, unknown> = {};
127+
payload.self = payload;
128128

129-
trackUser(payload as unknown as string);
129+
trackUser(payload as unknown as string);
130130

131-
expect(consoleErrorMock).toHaveBeenCalledWith(
132-
'Failed to format tracking payload',
133-
expect.any(TypeError),
134-
);
131+
expect(consoleErrorMock).toHaveBeenCalledWith(
132+
'Failed to format tracking payload',
133+
expect.any(TypeError)
134+
);
135135

136-
expect(fetchMock).not.toHaveBeenCalled();
137-
});
136+
expect(fetchMock).not.toHaveBeenCalled();
137+
});
138138

139139
it('handles non-serializable input gracefully without throwing', () => {
140140
// A circular reference cannot be serialized by JSON.stringify and will throw
@@ -192,4 +192,4 @@ describe('trackUser', () => {
192192
expect(sendBeaconMock).not.toHaveBeenCalled();
193193
expect(fetchMock).not.toHaveBeenCalled();
194194
});
195-
});
195+
});

0 commit comments

Comments
 (0)