Skip to content

Commit ca2214d

Browse files
committed
test: fix test
1 parent f5a470c commit ca2214d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/analytics-browser/test/browser-client.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ describe('browser-client', () => {
553553
describe('setSessionId', () => {
554554
test('should set session id', async () => {
555555
await client.init(apiKey, { defaultTracking }).promise;
556-
void client.setSessionId(1);
556+
client.setSessionId(1);
557557
expect(client.getSessionId()).toBe(1);
558558
});
559559

@@ -657,7 +657,7 @@ describe('browser-client', () => {
657657
expect(client.getSessionId()).toBe(1);
658658
resolve();
659659
});
660-
void client.setSessionId(1);
660+
client.setSessionId(1);
661661
});
662662
});
663663
});
@@ -754,6 +754,9 @@ describe('browser-client', () => {
754754
expect(client.config.lastEventTime).not.toBe(lastEventTime);
755755
});
756756

757+
/**
758+
* Tests the reverse case of calling expire sessions
759+
*/
757760
test('should expire session w/o calling extend session using proxy', async () => {
758761
const lastEventTime = Date.now() - 1000;
759762
jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({
@@ -789,7 +792,7 @@ describe('browser-client', () => {
789792
await client.init(apiKey, { defaultTracking }).promise;
790793
client.config.pageCounter = 2;
791794
expect(client.config.pageCounter).toBe(2);
792-
void client.setSessionId(Date.now() + 5 * 60 * 60);
795+
client.setSessionId(Date.now() + 5 * 60 * 60);
793796
expect(client.config.pageCounter).toBe(0);
794797
});
795798
});

0 commit comments

Comments
 (0)