Skip to content

test(backend): cover default checker failure paths#1268

Open
pengyuayn wants to merge 1 commit into
LabsCrypt:mainfrom
pengyuayn:test/default-checker-failure-paths
Open

test(backend): cover default checker failure paths#1268
pengyuayn wants to merge 1 commit into
LabsCrypt:mainfrom
pengyuayn:test/default-checker-failure-paths

Conversation

@pengyuayn

Copy link
Copy Markdown

Summary

Validation

  • PASS: npm test -- --runInBand src/__tests__/defaultChecker.test.ts
  • NOTE: npm run typecheck is currently blocked by an existing unrelated src/middleware/auth.ts error: string | undefined passed where string/ArrayLike is required.

Closes #1204

@ogazboiz

ogazboiz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

nice failure-path coverage: the lock-already-held case (returns null, doesn't release a lock it never took) and the submission-throws case (batch recorded failed, failedSubmissions 1, lock released once via the finally path) are exactly the paths worth testing, and the asserted log strings match the source. tests pass 3/3. one thing:

  1. the branch is ~85 commits behind main, so the red ci is stale-base (pre-esm-conversion), not your test. please rebase so it runs against current main (and so we confirm the asserted log strings still match the current defaultChecker): git fetch origin && git rebase origin/main && git push --force-with-lease.

rebase and i'll merge.

if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Testing] DefaultChecker has no unit tests for its lock, batch-timeout, and submission failure paths

2 participants