Skip to content

Add integration tests for Chrome extension #17

@Olawoyin007

Description

@Olawoyin007

What

Add automated tests for the Chrome extension code. Currently all 30 tests cover the Python server - the extension JavaScript has no test coverage.

Scope

  • Set up a JS testing framework (Jest or Vitest)
  • Test `content.js`: DOM observation, text extraction, treatment application
  • Test `background.js`: API proxying, health check logic, settings management
  • Test `popup.js`: settings toggle behavior, slider updates
  • Mock `chrome.storage` and `chrome.runtime` APIs

Why

The extension is the user-facing surface of the project. Changes to DOM selectors, treatment logic, or settings handling should be caught by tests before reaching users.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextensionChrome/browser extension

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions