Skip to content

Commit 0d80fbe

Browse files
committed
fix scope domain tests
1 parent 623cac8 commit 0d80fbe

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

packages/node/test/async/domain.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getCurrentHub, Hub, runWithAsyncContext, setAsyncContextStrategy } from '@sentry/core';
2-
import * as domain from 'domain';
1+
import type { Hub } from '@sentry/core';
2+
import { getCurrentHub, runWithAsyncContext, setAsyncContextStrategy } from '@sentry/core';
33

44
import { setDomainAsyncContextStrategy } from '../../src/async/domain';
55

@@ -9,13 +9,6 @@ describe('domains', () => {
99
setAsyncContextStrategy(undefined);
1010
});
1111

12-
test('without domain', () => {
13-
// @ts-ignore property active does not exist on domain
14-
expect(domain.active).toBeFalsy();
15-
const hub = getCurrentHub();
16-
expect(hub).toEqual(new Hub());
17-
});
18-
1912
test('hub scope inheritance', () => {
2013
setDomainAsyncContextStrategy();
2114

packages/node/test/async/hooks.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { getCurrentHub, Hub, runWithAsyncContext, setAsyncContextStrategy } from '@sentry/core';
1+
import type { Hub } from '@sentry/core';
2+
import { getCurrentHub, runWithAsyncContext, setAsyncContextStrategy } from '@sentry/core';
23

34
import { setHooksAsyncContextStrategy } from '../../src/async/hooks';
45
import { conditionalTest } from '../utils';
@@ -9,11 +10,6 @@ conditionalTest({ min: 12 })('async_hooks', () => {
910
setAsyncContextStrategy(undefined);
1011
});
1112

12-
test('without context', () => {
13-
const hub = getCurrentHub();
14-
expect(hub).toEqual(new Hub());
15-
});
16-
1713
test('without strategy hubs should be equal', () => {
1814
runWithAsyncContext(() => {
1915
const hub1 = getCurrentHub();

0 commit comments

Comments
 (0)