Proposal for integration/unit testing · Issue #36 · uBlockOrigin/uBlock-issues · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Proposal for integration/unit testing #36

Closed
@geoffdutton

Description

@geoffdutton

@gorhill I'm not sure if this is something you're interested in, but here is my proposal for unit testing: https://github.com/geoffdutton/uBlock/tree/unit-tests-proposal
Here is the current diff: https://github.com/gorhill/uBlock/compare/master...geoffdutton:unit-tests-proposal?expand=1

I've written a few test cases, and would be happy to contribute more. I think it can help for two main reasons:

  1. Preventing regressions
  2. Refactoring code and trying performance improvements

Number 2 is especially nice, such as when parsing new filter syntaxes or running extreme scenarios.

I'd be happy to go into more detail on how to write tests, when to mock functions, how to mimic browser features, etc. I chose jest because it's fast, and you can mimic any browser like here.

Let me know if this is something you're interested in incorporating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionweighing in community's input on a specific topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.