Skip to content

Commit a046be6

Browse files
committed
clarify language around sampling status in tests
1 parent b4eb92d commit a046be6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/tracing/test/browser/browsertracing.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ describe('BrowserTracing', () => {
177177
expect(mockBeforeNavigation).toHaveBeenCalledTimes(1);
178178
});
179179

180-
it('creates an unsampled transaction if it returns undefined', () => {
180+
it('creates a transaction with sampled = false if it returns undefined', () => {
181181
const mockBeforeNavigation = jest.fn().mockReturnValue(undefined);
182182
createBrowserTracing(true, {
183183
beforeNavigate: mockBeforeNavigation,

packages/tracing/test/hub.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('Hub', () => {
3030
});
3131

3232
describe('getTransaction()', () => {
33-
it('should find a sampled transaction which has been set on the scope', () => {
33+
it('should find a transaction which has been set on the scope if sampled = true', () => {
3434
const hub = new Hub(new BrowserClient({ tracesSampleRate: 1 }));
3535
const transaction = hub.startTransaction({ name: 'dogpark' });
3636
hub.configureScope(scope => {
@@ -40,7 +40,7 @@ describe('Hub', () => {
4040
expect(hub.getScope()?.getTransaction()).toBe(transaction);
4141
});
4242

43-
it('should find an unsampled transaction which has been set on the scope', () => {
43+
it('should find a transaction which has been set on the scope if sampled = false', () => {
4444
const hub = new Hub(new BrowserClient({ tracesSampleRate: 1 }));
4545
const transaction = hub.startTransaction({ name: 'dogpark', sampled: false });
4646
hub.configureScope(scope => {

0 commit comments

Comments
 (0)