mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:23:10 +00:00
Merge pull request #3703 from overleaf/jpa-spd-mocks-reset-is-optional
[tests] mocks: .reset() is optional GitOrigin-RevId: ad2db1ecc69f57fa9deea0ff124e3f0be212f0ee
This commit is contained in:
parent
6f2fdb268c
commit
a2000cb171
3 changed files with 2 additions and 11 deletions
|
@ -100,14 +100,9 @@ class AbstractMockApi {
|
|||
|
||||
/**
|
||||
* Resets member data and restores the API to a clean state for the next test run
|
||||
* - should be overridden in derived classes
|
||||
* @abstract
|
||||
* - may be overridden in derived classes
|
||||
*/
|
||||
reset() {
|
||||
throw new OError(
|
||||
'AbstractMockApi base class implementation should not be called'
|
||||
)
|
||||
}
|
||||
reset() {}
|
||||
|
||||
/**
|
||||
* Applies mocha hooks to start and stop the API at the beginning/end of
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
const AbstractMockApi = require('./AbstractMockApi')
|
||||
|
||||
class MockClsiApi extends AbstractMockApi {
|
||||
reset() {}
|
||||
|
||||
static compile(req, res) {
|
||||
res.status(200).send({
|
||||
compile: {
|
||||
|
|
|
@ -5,8 +5,6 @@ const AbstractMockApi = require('./AbstractMockApi')
|
|||
// output when the acceptance tests try to connect.
|
||||
|
||||
class MockNotificationsApi extends AbstractMockApi {
|
||||
reset() {}
|
||||
|
||||
applyRoutes() {
|
||||
this.app.get('/*', (req, res) => res.sendStatus(200))
|
||||
this.app.post('/*', (req, res) => res.sendStatus(200))
|
||||
|
|
Loading…
Reference in a new issue