Skip to content

Commit fd23147

Browse files
committed
ref: Revert tests
1 parent ebd3680 commit fd23147

File tree

2 files changed

+22
-35
lines changed

2 files changed

+22
-35
lines changed

packages/apm/test/hub.test.ts

+22
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,28 @@ describe('Hub', () => {
1111
jest.useRealTimers();
1212
});
1313

14+
describe('getTransaction', () => {
15+
test('simple invoke', () => {
16+
const hub = new Hub(new BrowserClient({ tracesSampleRate: 1 }));
17+
const transaction = hub.startTransaction({ name: 'foo' });
18+
hub.configureScope(scope => {
19+
scope.setSpan(transaction);
20+
});
21+
hub.configureScope(s => {
22+
expect(s.getTransaction()).toBe(transaction);
23+
});
24+
});
25+
26+
test('not invoke', () => {
27+
const hub = new Hub(new BrowserClient({ tracesSampleRate: 1 }));
28+
const transaction = hub.startTransaction({ name: 'foo' });
29+
hub.configureScope(s => {
30+
expect(s.getTransaction()).toBeUndefined();
31+
});
32+
transaction.finish();
33+
});
34+
});
35+
1436
describe('spans', () => {
1537
describe('sampling', () => {
1638
test('set tracesSampleRate 0 on span', () => {

packages/apm/test/scope.test.ts

-35
This file was deleted.

0 commit comments

Comments
 (0)