From dcb497d64b5abf3e57c513101a48e1f42977eb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 10 Mar 2026 09:11:19 +0800 Subject: [PATCH] Use void operator for getter side-effect access in tests (S1481) Co-Authored-By: Claude Opus 4.6 --- tests/stores/allMapData.test.js | 2 +- tests/stores/conformance.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/stores/allMapData.test.js b/tests/stores/allMapData.test.js index bdab44c..8c2da60 100644 --- a/tests/stores/allMapData.test.js +++ b/tests/stores/allMapData.test.js @@ -237,7 +237,7 @@ describe("allMapDataStore", () => { { type: "date", min: originalDate, max: "2023-12-31T23:59:00Z" }, ]; // Access the getter once - const _accessed = store.filterAttrs; + void store.filterAttrs; // The original state should still contain the ISO date, not a formatted string expect(store.allFilterAttrs[0].min).toBe(originalDate); }); diff --git a/tests/stores/conformance.test.js b/tests/stores/conformance.test.js index 962281b..14d078a 100644 --- a/tests/stores/conformance.test.js +++ b/tests/stores/conformance.test.js @@ -204,7 +204,7 @@ describe("conformanceStore", () => { attributes: [], }, ]; - const _accessed = store.cases; + void store.cases; // Original state should still contain the ISO date expect(store.allCases[0].started_at).toBe(originalDate); });