chore/port-solidtime-audit-fixes #1

Merged
danijel merged 54 commits from chore/port-solidtime-audit-fixes into main 2026-07-12 21:13:09 +00:00
64 changed files with 1574 additions and 632 deletions
Showing only changes of commit bb2751eede - Show all commits

View File

@@ -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 {};

View File

@@ -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",