Skip to content

Commit

Permalink
Fix agent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampax committed Nov 30, 2021
1 parent ae16c4d commit fcf0c87
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/agent/mock_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ class MockDeviceDatabase extends events.EventEmitter {
if (kind)
return this.getAllDevicesOfKind(kind);
return Object.keys(this._devices).map((k) => {
return this._devices[k];
return this._devices[k];
});
}

getAllDevicesOfKind(kind) {
return this.getAllDevices().filter((d) => {
return d.kind === kind;
return d.kind === kind;
});
}
}
Expand Down Expand Up @@ -515,6 +515,10 @@ class MockLocalTable {
return this.getAll().then((rows) => rows.filter((row) => row[field] === value));
}

search() {
return this.getAll();
}

getOne(uniqueId) {
return new Promise((resolve) => {
resolve(this._db[uniqueId]);
Expand Down

0 comments on commit fcf0c87

Please sign in to comment.