From a7010fb4866929118acbbb8240e27826e18ce13a Mon Sep 17 00:00:00 2001 From: gabrieledm Date: Wed, 26 Aug 2026 16:04:53 +0200 Subject: [PATCH 1/2] test: used setup function in 'function name override' tests --- .../tron-wallet-snap/src/caching/useCache.test.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/tron-wallet-snap/src/caching/useCache.test.ts b/packages/tron-wallet-snap/src/caching/useCache.test.ts index d69a17da..99cb712a 100644 --- a/packages/tron-wallet-snap/src/caching/useCache.test.ts +++ b/packages/tron-wallet-snap/src/caching/useCache.test.ts @@ -318,14 +318,16 @@ describe('useCache', () => { describe('function name override', () => { it('should use the provided function name if given', async () => { - const cachedWithCustomName = useCache(testFunction, cache, { - ttlMilliseconds: 1000, - functionName: 'customFunctionName', - }); + await withUseCache(async ({ testFunction, cache }) => { + const cachedWithCustomName = useCache(testFunction, cache, { + ttlMilliseconds: 1000, + functionName: 'customFunctionName', + }); - await cachedWithCustomName(); + await cachedWithCustomName(); - expect(cache.get).toHaveBeenCalledWith('customFunctionName:'); + expect(cache.get).toHaveBeenCalledWith('customFunctionName:'); + }); }); }); From 1ccde1d625d3906c8bdd55dd572839cd047e385f Mon Sep 17 00:00:00 2001 From: gabrieledm Date: Thu, 27 Aug 2026 16:19:12 +0200 Subject: [PATCH 2/2] test: temporary disabled no-shadow ts rule to make the ci happy --- packages/tron-wallet-snap/src/caching/useCache.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tron-wallet-snap/src/caching/useCache.test.ts b/packages/tron-wallet-snap/src/caching/useCache.test.ts index 99cb712a..a0efd1f5 100644 --- a/packages/tron-wallet-snap/src/caching/useCache.test.ts +++ b/packages/tron-wallet-snap/src/caching/useCache.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars,@typescript-eslint/no-shadow */ +/* eslint-disable @typescript-eslint/no-unused-vars */ import type { Serializable } from '../utils/serialization/types'; import type { ICache } from './ICache'; import { useCache } from './useCache';