mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
[misc] test/unit: add missing require stubs for metrics and settings
This commit is contained in:
@@ -19,7 +19,10 @@ describe('ImageOptimiser', function() {
|
||||
ImageOptimiser = SandboxedModule.require(modulePath, {
|
||||
requires: {
|
||||
'./SafeExec': SafeExec,
|
||||
'logger-sharelatex': logger
|
||||
'logger-sharelatex': logger,
|
||||
'metrics-sharelatex': {
|
||||
Timer: sinon.stub().returns({ done: sinon.stub() })
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -7,7 +7,9 @@ describe('LocalFileWriter', function() {
|
||||
const key = 'wombat/potato'
|
||||
|
||||
beforeEach(function() {
|
||||
KeyBuilder = SandboxedModule.require(modulePath)
|
||||
KeyBuilder = SandboxedModule.require(modulePath, {
|
||||
requires: { 'settings-sharelatex': {} }
|
||||
})
|
||||
})
|
||||
|
||||
describe('cachedKey', function() {
|
||||
|
||||
Reference in New Issue
Block a user