mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-26 07:57:36 +00:00
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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user