mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
[misc] test/unit: add missing require stubs for metrics and settings
This commit is contained in:
parent
0cdcac4cd2
commit
7920570dd8
2 changed files with 7 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue