fix: avoid false-positive testing-library/prefer-presence-queries

The eslint-plugin-testing-library prefer-presence-queries rule
auto-fixes `service.getById(...)` to `service.queryById(...)` when
inside `expect(...).toBeNull()`, mistaking our service method for a
Testing Library query. Extracting the call into a variable breaks the
pattern match without changing semantics or the public API.
This commit is contained in:
bymyself
2026-05-03 01:37:00 -07:00
parent a8d5140298
commit 9e10a100b3

View File

@@ -48,7 +48,8 @@ describe('createBrowserDownloadService', () => {
it('getById returns null', () => {
const service = createBrowserDownloadService()
expect(service.getById('anything')).toBeNull()
const entry = service.getById('anything')
expect(entry).toBeNull()
})
it('onProgress returns a no-op unsubscribe', () => {