async function runJsUsage({coverage}) {
    const driver = createMockDriver();
    driver._session.sendCommand
      .mockResponse('Profiler.enable', {})
      .mockResponse('Profiler.disable', {})
      .mockResponse('Profiler.startPreciseCoverage', {})
      .mockResponse('Profiler.takePreciseCoverage', {result: coverage})
      .mockResponse('Profiler.stopPreciseCoverage', {});

    const gatherer = new JsUsage();
    await gatherer.startInstrumentation({driver});
    await gatherer.startSensitiveInstrumentation({driver});

    // Needed for protocol events to emit.
    await flushAllTimersAndMicrotasks(1);

    await gatherer.stopSensitiveInstrumentation({driver});
    await gatherer.stopInstrumentation({driver});

    expect(gatherer._scriptUsages).toEqual(coverage);

    return gatherer.getArtifact({gatherMode: 'navigation'});
  }
`scriptParsedEvents` mocks the `Debugger.scriptParsed` events.
`coverage` mocks the result of `Profiler.takePreciseCoverage`.
@param {{coverage: LH.Crdp.Profiler.ScriptCoverage[]}} _
@return {Promise<LH.Artifacts['JsUsage']>}