Open Bug 1585265 Opened 5 years ago Updated 2 years ago

Use a shared helper to create local DebuggerClient in DevTools tests

Categories

(DevTools :: Framework, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

A lot of tests are duplicating such piece of code:

  DebuggerServer.init();
  DebuggerServer.registerAllActors();
  const transport = DebuggerServer.connectPipe();
  const client = new DebuggerClient(transport);
  await client.connect();

Or a very small variation of it.
We should stop doing that and instead have a shared helper to:

  • create the server if needed
  • instantiate a DebuggerClient
  • connect it

A good way to spot these is the following searchfox query:
https://searchfox.org/mozilla-central/search?q=DebuggerServer.connectPipe()&case=false&regexp=false&path=

Summary: Use a shared helper to client local DebuggerClient in DevTools tests → Use a shared helper to create local DebuggerClient in DevTools tests
Priority: -- → P3

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Framework
Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.