add the logger property to the null logger as well, forgot this before
This commit is contained in:
parent
2d2521cd9a
commit
0d486a14f6
2 changed files with 7 additions and 3 deletions
|
@ -20,7 +20,7 @@ function noop () {}
|
||||||
|
|
||||||
export class NullLogger {
|
export class NullLogger {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.item = new NullLogItem();
|
this.item = new NullLogItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
log() {}
|
log() {}
|
||||||
|
@ -51,6 +51,10 @@ export class NullLogger {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NullLogItem {
|
export class NullLogItem {
|
||||||
|
constructor(logger) {
|
||||||
|
this.logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
wrap(_, callback) {
|
wrap(_, callback) {
|
||||||
return callback(this);
|
return callback(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@ limitations under the License.
|
||||||
|
|
||||||
import {FDBFactory, FDBKeyRange} from "../../lib/fake-indexeddb/index.js";
|
import {FDBFactory, FDBKeyRange} from "../../lib/fake-indexeddb/index.js";
|
||||||
import {StorageFactory} from "../matrix/storage/idb/StorageFactory";
|
import {StorageFactory} from "../matrix/storage/idb/StorageFactory";
|
||||||
import {NullLogItem} from "../logging/NullLogger.js";
|
import {Instance as nullLogger} from "../logging/NullLogger.js";
|
||||||
|
|
||||||
export function createMockStorage() {
|
export function createMockStorage() {
|
||||||
return new StorageFactory(null, new FDBFactory(), FDBKeyRange).create(1, new NullLogItem());
|
return new StorageFactory(null, new FDBFactory(), FDBKeyRange).create(1, nullLogger.item);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue