ChromeDevTools / ChromeDevTools/chrome-devtools-mcp

[Task]: Optimize tests

Open
#2,639 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

confirmed
Dominant language
TypeScript
Stars
52.3k
Forks
4.3k
Avg merge
2d 7h
Merged PRs (30d)
83

Description

Task to do:

Currently, many of our tests use a real browser that makes tests slow. We should re-architect tests to make sure we correct do unit tests: 1) tool handler tests that should just verify the outcome of the tool call on the context and response, they should use mocks 2) formatter tests should not use real McpContext 3) retain fewer tests using the real browser for high-level e2e tests.

Working on this task requires creating small PRs that can be easily reviewed to avoid loosing test coverage.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the tests that use a real browser, then identify the tool handler and formatter test groups described in the task. Split the work into small PRs: unit tests should mock tool calls and avoid real McpContext, while only high-level e2e tests retain browser coverage; done means coverage is preserved with faster tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.