SEPURI-SAI-KRISHNA commented on PR #42409:
URL: https://github.com/apache/superset/pull/42409#issuecomment-5113608550

   Adopted Copilot's suggestion on both threads — the two tests added here now 
use
   `toBe(true)` / `toBe(false)`. `LRUCache#has` is typed `has(key: string): 
boolean`,
   so the strict matchers are accurate and will fail loudly if that return type 
ever
   changes.
   
   Flagging one thing for a maintainer to overrule if they disagree: this makes 
the
   new tests inconsistent with the rest of the file, which uses
   `toBeTruthy()`/`toBeFalsy()` in five places (lines 36, 43, 44, 60, 61), and 
it
   runs against the prevailing convention in `superset-ui-core/test/`, where the
   loose matchers outnumber the strict ones 58 to 31. I applied it only to the 
two
   tests this PR adds rather than churning unrelated assertions. Happy to 
revert to
   the surrounding style if you'd rather the file stayed uniform.
   
   No behaviour change — `lruCache.ts` is untouched by this commit. Verified:
   
   - `npm run test -- packages/superset-ui-core/test/utils/lruCache.test.ts` — 
5 passed
   - consumers unaffected: `src/views/CRUD`, 
`src/SqlLab/components/QueryAutoRefresh` — 62 passed
   - oxlint, custom-rules, prettier, and `tsc --build` on the package all clean
   - still a genuine regression test: reverting the `set()` fix fails it with
     `Expected: 2, Received: 1`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to