mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-25 00:43:09 +00:00
Merge pull request #31 from overleaf/jpa-fix-unit-tests
[misc] fix unit tests
This commit is contained in:
commit
ea435c88ea
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ describe 'timeAsyncMethod', ->
|
|||
@timeAsyncMethod @testObject, 'nextNumber', 'someContext.TestObject'
|
||||
@testObject.nextNumber 2, (err, result) =>
|
||||
expect(@metrics.inc.callCount).to.equal 1
|
||||
expect(@metrics.inc.calledWith('someContext.TestObject.nextNumber.success')).to.equal true
|
||||
expect(@metrics.inc.calledWith('someContext_result', 1, { method: 'TestObject_nextNumber', status: 'success'})).to.equal true
|
||||
done()
|
||||
|
||||
describe 'when base method produces an error', ->
|
||||
|
@ -78,7 +78,7 @@ describe 'timeAsyncMethod', ->
|
|||
@timeAsyncMethod @testObject, 'nextNumber', 'someContext.TestObject'
|
||||
@testObject.nextNumber 2, (err, result) =>
|
||||
expect(@metrics.inc.callCount).to.equal 1
|
||||
expect(@metrics.inc.calledWith('someContext.TestObject.nextNumber.failure')).to.equal true
|
||||
expect(@metrics.inc.calledWith('someContext_result', 1, { method: 'TestObject_nextNumber', status: 'failed'})).to.equal true
|
||||
done()
|
||||
|
||||
describe 'when a logger is supplied', ->
|
||||
|
|
Loading…
Reference in a new issue