mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-07 16:19:02 +02:00
[web] use a global shared mock for the metrics module (#32799)
GitOrigin-RevId: 72874ba6c06c2a602b01cc029bc9c71ce3ce8892
This commit is contained in:
@@ -68,9 +68,6 @@ describe('SplitTestHandler', function () {
|
||||
ctx.SessionManager = {
|
||||
isUserLoggedIn: sinon.stub().returns(false),
|
||||
}
|
||||
ctx.Metrics = {
|
||||
inc: sinon.stub(),
|
||||
}
|
||||
|
||||
Features = {
|
||||
hasFeature: vi.fn().mockReturnValue(true),
|
||||
@@ -132,8 +129,6 @@ describe('SplitTestHandler', function () {
|
||||
default: ctx.Settings,
|
||||
}))
|
||||
|
||||
vi.doMock('@overleaf/metrics', () => ({ default: ctx.Metrics }))
|
||||
|
||||
ctx.SplitTestHandler = (await import(MODULE_PATH)).default
|
||||
|
||||
ctx.req = new MockRequest(vi)
|
||||
|
||||
Reference in New Issue
Block a user