Skip to content

Commit b075ca2

Browse files
only21milclaude
andcommitted
test(desktop): keep local environment off through an unreadable-field load and save
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a3ca0bd commit b075ca2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎apps/desktop/src/settings/DesktopAppSettings.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ describe("DesktopSettings", () => {
166166
environment.desktopSettingsPath,
167167
`{
168168
// JSONC-style comments and trailing commas match server settings parsing.
169+
"localEnvironmentEnabled": false,
169170
"serverExposureMode": "network-accessible",
170171
"tailscaleServeEnabled": true,
171172
"tailscaleServePort": 8443,
@@ -176,9 +177,10 @@ describe("DesktopSettings", () => {
176177
}\n`,
177178
);
178179

179-
assert.deepEqual(yield* settings.load, {
180+
const loaded = yield* settings.load;
181+
assert.deepEqual(loaded, {
180182
linuxPasswordStore: "auto",
181-
localEnvironmentEnabled: true,
183+
localEnvironmentEnabled: false,
182184
mainWindowBounds: { x: 120, y: 80, width: 1280, height: 900 },
183185
mainWindowMaximized: false,
184186
serverExposureMode: "network-accessible",
@@ -190,6 +192,9 @@ describe("DesktopSettings", () => {
190192
wslOnly: false,
191193
wslDistro: null,
192194
} satisfies DesktopAppSettings.DesktopSettings);
195+
196+
yield* settings.setServerExposureMode("local-only");
197+
assert.deepEqual(yield* settings.load, { ...loaded, serverExposureMode: "local-only" });
193198
}),
194199
),
195200
);

0 commit comments

Comments
 (0)