fix(store.test.ts): fix experimentalFeatures test to match replacement semantics
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user