diff --git a/packages/core-testing/src/setup/node.ts b/packages/core-testing/src/setup/node.ts index d186513..872a132 100644 --- a/packages/core-testing/src/setup/node.ts +++ b/packages/core-testing/src/setup/node.ts @@ -1,5 +1,6 @@ import "./no-instrumentation"; -// Reserved for future global node-env setup. Currently a no-op so that -// vitest configs may reference @repo/core-testing/setup/node uniformly. +// Applies the no-instrumentation guard (vi.mock against real Sentry/OTel SDK +// init) via the import above; otherwise reserved for future global node-env +// setup so vitest configs may reference @repo/core-testing/setup/node uniformly. export {}; diff --git a/packages/core-typescript/vitest.base.jsdom.test.ts b/packages/core-typescript/vitest.base.jsdom.test.ts index 9f0c54e..9e42802 100644 --- a/packages/core-typescript/vitest.base.jsdom.test.ts +++ b/packages/core-typescript/vitest.base.jsdom.test.ts @@ -3,7 +3,8 @@ import { jsdomVitestConfig } from "./vitest.base.jsdom"; // jsdomVitestConfig is built with mergeConfig(nodeVitestConfig, ...). // mergeConfig concatenates arrays rather than replacing them, so: -// - setupFiles inherits the node setup file (currently a no-op) AND adds the jsdom one +// - setupFiles inherits the node setup file (which applies the +// no-instrumentation guard) AND adds the jsdom one // - include inherits the node patterns AND adds the tsx-aware patterns (the file globs deduplicate at resolution) // We assert the EXACT merged arrays so any future change to setup/node.ts or to include // behavior is consciously visible in this test. @@ -12,7 +13,7 @@ describe("jsdomVitestConfig", () => { it("uses jsdom environment", () => { expect(jsdomVitestConfig.test?.environment).toBe("jsdom"); }); - it("loads both the node setup (no-op) and jsdom setup files", () => { + it("loads both the node setup (no-instrumentation guard) and jsdom setup files", () => { expect(jsdomVitestConfig.test?.setupFiles).toEqual([ "@repo/core-testing/setup/node", "@repo/core-testing/setup/jsdom",