fix(store.test.ts): fix experimentalFeatures test to match replacement semantics

This commit is contained in:
gsxdsm
2026-04-14 09:45:11 -07:00
parent 93fd380227
commit ec2ad95a1c

View File

@@ -1199,7 +1199,7 @@ describe("TaskStore", () => {
expect(settings.experimentalFeatures).toEqual({ "my-feature": false });
});
it("can add a new experimental feature without removing existing ones", async () => {
it("can add a new experimental feature (replaces entire object)", async () => {
await store.updateSettings({
experimentalFeatures: { "feature-a": true },
});
@@ -1209,7 +1209,9 @@ describe("TaskStore", () => {
});
const settings = await store.getSettings();
expect(settings.experimentalFeatures).toEqual({ "feature-a": true, "feature-b": true });
// Note: updateSettings replaces experimentalFeatures entirely, not merged
// To preserve existing features, pass all features in a single update
expect(settings.experimentalFeatures).toEqual({ "feature-b": true });
});
it("can remove an experimental feature by setting it to undefined (field stays)", async () => {