Skip to content

Commit 73416e8

Browse files
elirangoshenclaude
andcommitted
test: use for…of in evictFromCache helper to satisfy unicorn/no-array-for-each
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 58e345e commit 73416e8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/unit/onyxUtilsTest.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,11 +975,12 @@ describe('OnyxUtils', () => {
975975
// miss it (unless the entire storageKeys set is empty, in which case the function falls back
976976
// to Storage.getAllKeys). To reliably hit the cold-but-persisted state regardless of how many
977977
// other keys remain in cache, we re-register the key as known after dropping its value.
978-
const evictFromCache = (...keys: string[]) =>
979-
keys.forEach((key) => {
978+
const evictFromCache = (...keys: string[]) => {
979+
for (const key of keys) {
980980
OnyxCache.drop(key);
981981
OnyxCache.addKey(key);
982-
});
982+
}
983+
};
983984

984985
it('fast path: skips storage reads entirely when every existing key is warm in cache', async () => {
985986
const collectionKey = ONYXKEYS.COLLECTION.TEST_KEY;

0 commit comments

Comments
 (0)