Background
In T404058: Add MetricsPlatform to gated extensions, I decided not to make MetricsPlatform a gated extension but instead to provide a stub experiment manager for JS tests. This task covers doing that.
AC
- Calling mw.xLab.mockExperimentEnrollment( name, group ) defines a mock experiment for the duration of the test and returns a mocked Experiment instance
- Calling mw.xLab.getExperiment( name ) returns the same mocked Experiment instance
- Calling mw.xLab.restoreMockExperiments() removes all mock experiments