Skip to content

Commit e62393b

Browse files
committed
add tests
1 parent e7568c5 commit e62393b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/hub/test/hub.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,4 +431,23 @@ describe('Hub', () => {
431431
});
432432
});
433433
});
434+
435+
describe('shouldSendDefaultPii()', () => {
436+
test('return false if sendDefaultPii is not set', () => {
437+
const testClient = makeClient();
438+
const hub = new Hub(testClient);
439+
expect(hub.shouldSendDefaultPii()).toBe(false);
440+
});
441+
442+
test('return true if sendDefaultPii is set in the client options', () => {
443+
const testClient = makeClient();
444+
testClient.getOptions = () => {
445+
return {
446+
sendDefaultPii: true,
447+
} as unknown as any;
448+
};
449+
const hub = new Hub(testClient);
450+
expect(hub.shouldSendDefaultPii()).toBe(true);
451+
});
452+
});
434453
});

0 commit comments

Comments
 (0)