Replace void with expect().toBeDefined() for getter side-effect access (S3735)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -236,8 +236,8 @@ describe("allMapDataStore", () => {
|
|||||||
store.allFilterAttrs = [
|
store.allFilterAttrs = [
|
||||||
{ type: "date", min: originalDate, max: "2023-12-31T23:59:00Z" },
|
{ type: "date", min: originalDate, max: "2023-12-31T23:59:00Z" },
|
||||||
];
|
];
|
||||||
// Access the getter once
|
// Access the getter once to trigger any side effects
|
||||||
void store.filterAttrs;
|
expect(store.filterAttrs).toBeDefined();
|
||||||
// The original state should still contain the ISO date, not a formatted string
|
// The original state should still contain the ISO date, not a formatted string
|
||||||
expect(store.allFilterAttrs[0].min).toBe(originalDate);
|
expect(store.allFilterAttrs[0].min).toBe(originalDate);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ describe("conformanceStore", () => {
|
|||||||
attributes: [],
|
attributes: [],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
void store.cases;
|
expect(store.cases).toBeDefined();
|
||||||
// Original state should still contain the ISO date
|
// Original state should still contain the ISO date
|
||||||
expect(store.allCases[0].started_at).toBe(originalDate);
|
expect(store.allCases[0].started_at).toBe(originalDate);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user