From bb2751eede98bec944282fedfdfe6f0d76485a49 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Fri, 10 Jul 2026 17:20:27 +0200 Subject: [PATCH] docs: correct stale no-op comments in node test setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setup/node.ts installs the no-instrumentation guard (vi.mock against real Sentry/OTel SDK init) via its import — it was never a no-op. Fix the same lie in core-typescript's jsdom base-config test comments and test title. (S2) Co-Authored-By: Claude Fable 5 --- packages/core-testing/src/setup/node.ts | 5 +++-- packages/core-typescript/vitest.base.jsdom.test.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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",