mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Decaf cleanup: simplify stubbed class
This commit is contained in:
parent
526ef25fcf
commit
3acb970442
1 changed files with 3 additions and 16 deletions
|
@ -2,13 +2,6 @@
|
||||||
no-return-assign,
|
no-return-assign,
|
||||||
no-unused-vars,
|
no-unused-vars,
|
||||||
*/
|
*/
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
|
||||||
// Fix any style issues and re-enable lint.
|
|
||||||
/*
|
|
||||||
* decaffeinate suggestions:
|
|
||||||
* DS206: Consider reworking classes to avoid initClass
|
|
||||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
||||||
*/
|
|
||||||
const sinon = require('sinon')
|
const sinon = require('sinon')
|
||||||
const chai = require('chai')
|
const chai = require('chai')
|
||||||
const should = chai.should()
|
const should = chai.should()
|
||||||
|
@ -33,15 +26,9 @@ describe('HttpController', function () {
|
||||||
'./Errors': Errors
|
'./Errors': Errors
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.Metrics.Timer = Timer = (function () {
|
this.Metrics.Timer = class Timer {}
|
||||||
Timer = class Timer {
|
Timer.prototype.done = sinon.stub()
|
||||||
static initClass() {
|
|
||||||
this.prototype.done = sinon.stub()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Timer.initClass()
|
|
||||||
return Timer
|
|
||||||
})()
|
|
||||||
this.project_id = 'project-id-123'
|
this.project_id = 'project-id-123'
|
||||||
this.doc_id = 'doc-id-123'
|
this.doc_id = 'doc-id-123'
|
||||||
this.next = sinon.stub()
|
this.next = sinon.stub()
|
||||||
|
|
Loading…
Reference in a new issue