diff --git a/spec/unit/matrix-client.spec.js b/spec/unit/matrix-client.spec.js index 422dc995b..cac141a96 100644 --- a/spec/unit/matrix-client.spec.js +++ b/spec/unit/matrix-client.spec.js @@ -134,7 +134,7 @@ describe("MatrixClient", function() { "getRoom", "getRooms", "getUser", "getSyncToken", "scrollback", "save", "setSyncToken", "storeEvents", "storeRoom", "storeUser", "getFilterIdByName", "setFilterIdByName", "getFilter", "storeFilter", - "getSyncAccumulator", + "getSyncAccumulator", "startup", ].reduce((r, k) => { r[k] = expect.createSpy(); return r; }, {}); client = new MatrixClient({ baseUrl: "https://my.home.server", diff --git a/src/store/memory.js b/src/store/memory.js index d356369ed..249edeeaf 100644 --- a/src/store/memory.js +++ b/src/store/memory.js @@ -21,6 +21,7 @@ limitations under the License. */ const utils = require("../utils"); const User = require("../models/user"); + const q = require("q"); /** * Construct a new in-memory data store for the Matrix Client. @@ -288,4 +289,12 @@ module.exports.MatrixInMemoryStore.prototype = { getSyncAccumulator: function() { return null; }, + + /** + * Startup does nothing as this store doesn't require starting up. + * @return {Promise} An immediately resolved promise. + */ + startup: function() { + return q(); + }, }; diff --git a/src/store/stub.js b/src/store/stub.js index 539577f42..a7e38c5ee 100644 --- a/src/store/stub.js +++ b/src/store/stub.js @@ -15,6 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ "use strict"; +import q from "q"; /** * This is an internal module. * @module store/stub @@ -193,6 +194,14 @@ StubStore.prototype = { getSyncAccumulator: function() { return null; }, + + /** + * Startup does nothing. + * @return {Promise} An immediately resolved promise. + */ + startup: function() { + return q(); + }, }; /** Stub Store class. */