diff --git a/src/bindings.test.ts b/test/bindings.test.ts similarity index 94% rename from src/bindings.test.ts rename to test/bindings.test.ts index a2b0d96e..984d7d1d 100644 --- a/src/bindings.test.ts +++ b/test/bindings.test.ts @@ -1,7 +1,7 @@ // Contains unit tests for some of the C++ bindings. These functions // are exported on the private bindings object, so we can test them and // they should not be used outside of this file. -import { PrivateCpuProfilerBindings } from './cpu_profiler'; +import { PrivateCpuProfilerBindings } from '../src/cpu_profiler'; import { platform } from 'os'; const cases = [ diff --git a/src/cpu_profiler.test.ts b/test/cpu_profiler.test.ts similarity index 99% rename from src/cpu_profiler.test.ts rename to test/cpu_profiler.test.ts index a903be99..41f2b527 100644 --- a/src/cpu_profiler.test.ts +++ b/test/cpu_profiler.test.ts @@ -1,5 +1,5 @@ -import { CpuProfilerBindings, PrivateCpuProfilerBindings } from './cpu_profiler'; -import type { ThreadCpuProfile, RawThreadCpuProfile } from './types'; +import { CpuProfilerBindings, PrivateCpuProfilerBindings } from '../src/cpu_profiler'; +import type { ThreadCpuProfile, RawThreadCpuProfile } from '../src/types'; // Required because we test a hypothetical long profile // and we cannot use advance timers as the c++ relies on diff --git a/src/hubextensions.hub.test.ts b/test/hubextensions.hub.test.ts similarity index 99% rename from src/hubextensions.hub.test.ts rename to test/hubextensions.hub.test.ts index 1346722a..9b77413b 100644 --- a/src/hubextensions.hub.test.ts +++ b/test/hubextensions.hub.test.ts @@ -1,7 +1,7 @@ import * as Sentry from '@sentry/node'; -import { ProfilingIntegration } from './index'; -import { CpuProfilerBindings } from './cpu_profiler'; +import { ProfilingIntegration } from '../src/index'; +import { CpuProfilerBindings } from '../src/cpu_profiler'; import { logger, createEnvelope } from '@sentry/utils'; import { GLOBAL_OBJ } from '@sentry/utils'; import { NodeClient } from '@sentry/node'; diff --git a/src/hubextensions.test.ts b/test/hubextensions.test.ts similarity index 98% rename from src/hubextensions.test.ts rename to test/hubextensions.test.ts index ad988f91..7384e056 100644 --- a/src/hubextensions.test.ts +++ b/test/hubextensions.test.ts @@ -9,8 +9,8 @@ import type { import type { NodeClient } from '@sentry/node'; -import { __PRIVATE__wrapStartTransactionWithProfiling } from './hubextensions'; -import { CpuProfilerBindings } from './cpu_profiler'; +import { __PRIVATE__wrapStartTransactionWithProfiling } from '../src/hubextensions'; +import { CpuProfilerBindings } from '../src/cpu_profiler'; function makeTransactionMock(options = {}): Transaction { return { diff --git a/src/index.test.ts b/test/index.test.ts similarity index 97% rename from src/index.test.ts rename to test/index.test.ts index 50a2188d..95b44187 100644 --- a/src/index.test.ts +++ b/test/index.test.ts @@ -1,10 +1,10 @@ import * as Sentry from '@sentry/node'; import type { Transport } from '@sentry/types'; -import { ProfilingIntegration } from './index'; +import { ProfilingIntegration } from '../src/index'; import { NodeClient } from '@sentry/node'; import { getMainCarrier } from '@sentry/core'; -import type { Profile } from './types'; +import type { Profile } from '../src/types'; interface MockTransport extends Transport { events: any[]; diff --git a/src/integration.test.ts b/test/integration.test.ts similarity index 98% rename from src/integration.test.ts rename to test/integration.test.ts index 065654f1..c383dc6a 100644 --- a/src/integration.test.ts +++ b/test/integration.test.ts @@ -3,8 +3,8 @@ import { EventEmitter } from 'events'; import { logger } from '@sentry/utils'; import type { Event, Hub, Transport } from '@sentry/types'; -import { ProfilingIntegration } from './integration'; -import type { ProfiledEvent } from './types'; +import { ProfilingIntegration } from '../src/integration'; +import type { ProfiledEvent } from '../src/types'; function assertCleanProfile(event: ProfiledEvent | Event): void { expect(event.sdkProcessingMetadata?.profile).toBeUndefined(); diff --git a/src/utils.test.ts b/test/utils.test.ts similarity index 98% rename from src/utils.test.ts rename to test/utils.test.ts index 1dec79bd..ed27c549 100644 --- a/src/utils.test.ts +++ b/test/utils.test.ts @@ -6,10 +6,14 @@ import { isValidProfile, addProfilesToEnvelope, findProfiledTransactionsFromEnvelope -} from './utils'; +} from '../src/utils'; -import { maybeRemoveProfileFromSdkMetadata, isProfiledTransactionEvent, createProfilingEventEnvelope } from './utils'; -import type { Profile, ProfiledEvent } from './types'; +import { + maybeRemoveProfileFromSdkMetadata, + isProfiledTransactionEvent, + createProfilingEventEnvelope +} from '../src/utils'; +import type { Profile, ProfiledEvent } from '../src/types'; function makeSdkMetadata(props: Partial): SdkMetadata { return { diff --git a/tsconfig.base.json b/tsconfig.base.json index 8a0f2957..319f2d9b 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -19,8 +19,7 @@ "checkJs": false, "allowJs": true, "declaration": false, - "baseUrl": "./src", - "typeRoots": ["node_modules/@types"], + "typeRoots": ["node_modules/@types"] }, "types": ["./src/types.d.ts"], "exclude": ["src/**/*.test.ts", "scripts/**/*"]