Skip to content

Commit 0512db8

Browse files
radroidclaude
authored andcommitted
test(t3x): move fork settings coverage out of the upstream test file
`packages/contracts/src/settings.test.ts` is upstream-owned and churns hard (8 commits in 30 days). The fork's `notifyOnNeedsInput` block was inserted at the same `describe("ClientSettings glass opacity")` anchor that upstream keeps appending to, which produced a plain add/add rebase conflict on the daily upstream sync — the exact failure reported in issue #29 (upstream 362f127 vs fork a2ea115). Moving the three cases into a fork-owned file removes that file from the conflict surface permanently. `settings.test.ts` is now byte-identical to upstream again, so this class of conflict cannot recur there. The two decode helpers are re-declared rather than imported because the upstream test file keeps them module-local. No behaviour change; 27 tests still pass across both files. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent 6e30a99 commit 0512db8

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Fork-owned coverage for t3x additions to the shared settings contracts.
2+
//
3+
// These cases deliberately live OUTSIDE `packages/contracts/src/settings.test.ts`.
4+
// That file is upstream-owned and churns hard (8 commits in 30 days), and the fork's
5+
// block sat at the same `describe` anchor upstream keeps inserting at — which produced
6+
// a recurring add/add rebase conflict on the daily upstream sync (issue #29).
7+
// Keeping fork tests in a fork-owned file removes that file from the conflict surface.
8+
// See docs/t3x/SEAMS.md.
9+
//
10+
// The two decode helpers below are re-declared rather than imported because the
11+
// upstream test file keeps them module-local.
12+
13+
import { describe, expect, it } from "vite-plus/test";
14+
import * as Schema from "effect/Schema";
15+
16+
import { ClientSettingsSchema, ClientSettingsPatch } from "../settings.ts";
17+
18+
const decodeClientSettings = Schema.decodeUnknownSync(ClientSettingsSchema);
19+
const decodeClientSettingsPatch = Schema.decodeUnknownSync(ClientSettingsPatch);
20+
21+
describe("ClientSettings needs-input notifications", () => {
22+
it("defaults needs-input notifications on for existing installs", () => {
23+
expect(decodeClientSettings({}).notifyOnNeedsInput).toBe(true);
24+
});
25+
26+
it("honours an explicit opt-out", () => {
27+
expect(decodeClientSettings({ notifyOnNeedsInput: false }).notifyOnNeedsInput).toBe(false);
28+
});
29+
30+
it("accepts the toggle in a client settings patch", () => {
31+
expect(decodeClientSettingsPatch({}).notifyOnNeedsInput).toBeUndefined();
32+
expect(decodeClientSettingsPatch({ notifyOnNeedsInput: false }).notifyOnNeedsInput).toBe(false);
33+
});
34+
});

0 commit comments

Comments
 (0)