microsoft / microsoft/react-native-windows

Adjust Check For Metro Running in Debug Feature Tests

Open
#10,763 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Metro Area: Test Infrastructure enhancement Workstream: Test Coverage
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

In the Debug Feature Tests we launch metro from the test script itself. Then, to check that metro is up and running we verify that the string "Welcome to Metro!" is displayed. In the 8/12 integration we hit an issue where the Debug Feature Tests suddenly failed because the metro version was bumped and the startup string now did not contain a '!' character.

We should update this check to avoid breaks like these in future, since metro makes no guarantees on the contents of the startup message for future versions. Alex has found https://github.com/facebook/metro/blob/main/packages/metro/src/lib/TerminalReporter.js#L171 which could be used to add an even that metro raises when it is ready and running.

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 with the Debug Feature Tests and the test script that launches Metro, then review Metro's TerminalReporter.js readiness behavior at the linked location. Replace reliance on the exact "Welcome to Metro!" text with a readiness signal, and verify that the tests still wait for Metro to be running across version changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.