Skip to content

Commit c2ed30d

Browse files
committed
chore(tsconfig): let tests use JSON and Node built-ins without opt-outs
Test files opted out of `preferSchemaOverJson` and `nodeBuiltinImport` more than 300 times, mostly without a reason: fixtures parse raw JSON, and tests drive real files, processes, and keys. One override in `tsconfig.base.json` turns both rules off for `*.test.ts(x)`, and the opt-outs it makes redundant go. Source files and test helpers keep both rules.
1 parent 8f75697 commit c2ed30d

128 files changed

Lines changed: 23 additions & 352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/src/app/CodexAuthCallback.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @effect-diagnostics nodeBuiltinImport:off globalFetch:off - Tests exercise the real native loopback listener without an OpenAI account.
1+
// @effect-diagnostics globalFetch:off - Tests exercise the real native loopback listener without an OpenAI account.
22
import * as NodeHttp from "node:http";
33
import { describe, expect, it } from "vite-plus/test";
44
import { codexAuthDeliveryUrl, readCodexAuthDelivery } from "@t3tools/shared/codexAuthHandoff";

‎apps/desktop/src/app/DesktopAppActivation.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off -- This adapter test binds a real local socket or Windows named pipe and verifies its cleanup.
21
import * as NodeFSP from "node:fs/promises";
32
import * as NodeNet from "node:net";
43
import * as NodeOS from "node:os";

‎apps/desktop/src/app/DesktopClerk.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @effect-diagnostics nodeBuiltinImport:off globalFetchInEffect:off - Hosted handoff test uses a real localhost listener without an OpenAI account.
1+
// @effect-diagnostics globalFetchInEffect:off - Hosted handoff test uses a real localhost listener without an OpenAI account.
22
import * as NodeHttp from "node:http";
33
import * as NodePath from "@effect/platform-node/NodePath";
44
import { codexAuthHandoffUrl, readCodexAuthDelivery } from "@t3tools/shared/codexAuthHandoff";

‎apps/desktop/src/app/DesktopEarlyElectronStartup.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off - tests use POSIX path joining to match the Linux startup boundary.
21
import * as NodePath from "node:path";
32
import { assert, describe, it } from "@effect/vitest";
43

‎apps/desktop/src/preview/BrowserImport/ChromiumCookies.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off - Encrypts fixtures with the same
21
// OSCrypt primitives the module under test decrypts.
32
import * as NodeServices from "@effect/platform-node/NodeServices";
43
import { describe, expect, it } from "@effect/vitest";

‎apps/desktop/src/preview/BrowserImport/FirefoxCookies.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off - Builds a Firefox-shaped
21
// `cookies.sqlite` fixture with the same native bindings Firefox itself uses.
32
import * as NodePath from "@effect/platform-node/NodePath";
43
import * as NodeServices from "@effect/platform-node/NodeServices";

‎apps/desktop/src/preview/BrowserImport/SafariCookies.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off - Hand-builds Safari's binary jar
21
// format byte by byte.
32
import * as NodeServices from "@effect/platform-node/NodeServices";
43
import { assert, describe, expect, it } from "@effect/vitest";

‎apps/desktop/src/preview/BrowserImport/Sources.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off - Builds a Chromium-shaped cookie
21
// table with the same native bindings the source reads.
32
import * as NodePath from "node:path";
43
import * as NodeServices from "@effect/platform-node/NodeServices";

‎apps/desktop/src/snapShot/CaptureShortcutConfig.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off -- Isolated config fixtures, never the user's desktop.
21
import * as NodeFSP from "node:fs/promises";
32
import * as NodePath from "node:path";
43
import * as NodeOS from "node:os";

‎apps/desktop/src/snapShot/GnomeCaptureSetup.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @effect-diagnostics nodeBuiltinImport:off -- Native extension installation uses isolated filesystem fixtures.
21
import * as NodeFSP from "node:fs/promises";
32
import * as NodeOS from "node:os";
43
import * as NodePath from "node:path";

0 commit comments

Comments
 (0)