Skip to content

test: expand test coverage with 6 new suites#56

Open
heznpc wants to merge 2 commits intomainfrom
test/expand-coverage
Open

test: expand test coverage with 6 new suites#56
heznpc wants to merge 2 commits intomainfrom
test/expand-coverage

Conversation

@heznpc
Copy link
Copy Markdown
Owner

@heznpc heznpc commented Mar 28, 2026

Summary

  • Add 6 new test files covering background, content helpers, translator queue, YouTube subtitles, selectors, and Firefox build
  • ~750 new tests (236 → 990+)

Test plan

  • All existing tests still pass
  • New tests pass locally (npx jest tests/ --no-cache)

heznpc added 2 commits March 28, 2026 17:19
Add tests for background service worker, content helpers, translator
queue filtering, YouTube subtitles, selectors integrity, and Firefox
build script.
- Fix Map memory leak in content.js (5000 cap + DOM removal detection)
- Fix race condition in translator.js (Promise-based lock replaces boolean flag)
- Fix XSS in sidebar-chat.js (re-escape in applyInline + sanitizeHtml via DOMParser)
- Fix postMessage wildcard origin in page-bridge.js (use location.origin)
- Fix DOM-removed element reference guard in content.js
- Fix IndexedDB transaction completion guarantee in translator.js
- Fix missing nonce in BRIDGE_ERROR/CHAT_RESPONSE messages
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.

1 participant