@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 25 lines 863 Bytes
Raw
1 import { matchesDesired } from "@alchemy.run/gcp/Proto";
2 import { describe, expect, test } from "@alchemy.run/test";
3
4 describe("matchesDesired", () => {
5 test(
6 "ignores unspecified observed keys and accepts omitted proto defaults",
7 () => {
8 expect(matchesDesired({ enabled: false, serverGenerated: "value" }, { enabled: false })).toBe(
9 true,
10 );
11 expect(matchesDesired({}, { enabled: false, count: 0, name: "" })).toBe(true);
12 expect(matchesDesired({}, { values: [] })).toBe(true);
13 },
14 { tags: ["unit", "provider:gcp", "local"] },
15 );
16
17 test(
18 "does not treat an explicit null as an omitted field",
19 () => {
20 expect(matchesDesired({}, { value: null })).toBe(false);
21 expect(matchesDesired({ value: null }, { value: null })).toBe(true);
22 },
23 { tags: ["unit", "provider:gcp", "local"] },
24 );
25 });