1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Fix tests and tweak some optional types

This commit is contained in:
Michael Telatynski
2021-06-18 17:40:04 +01:00
parent 924b8629d8
commit 9dd00c7731
3 changed files with 17 additions and 17 deletions

View File

@@ -51,7 +51,7 @@ export function mock(constr, name) {
result.toString = function() {
return "mock" + (name ? " of " + name : "");
};
for (const key in constr.prototype) { // eslint-disable-line guard-for-in
for (const key of Object.getOwnPropertyNames(constr.prototype)) { // eslint-disable-line guard-for-in
try {
if (constr.prototype[key] instanceof Function) {
result[key] = jest.fn();