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:
Jakob Ackermann 2021-02-25 12:24:22 +00:00 committed by Copybot
parent 6f2fdb268c
commit a2000cb171
3 changed files with 2 additions and 11 deletions

View file

@ -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

View file

@ -1,8 +1,6 @@
const AbstractMockApi = require('./AbstractMockApi')
class MockClsiApi extends AbstractMockApi {
reset() {}
static compile(req, res) {
res.status(200).send({
compile: {

View file

@ -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))