mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Cleanup and fix tests
This commit is contained in:
parent
a4dc49b83b
commit
a54ef8c337
@ -34,9 +34,9 @@ class Client {
|
||||
del: (key) => this.db.del(channel, password, key),
|
||||
add: (data) => this.db.add(channel, password, data),
|
||||
put: (key, data) => this.db.put(channel, password, key, data),
|
||||
get: (key, options) => {
|
||||
get: (key) => {
|
||||
const items = this._iterator(channel, password, { key: key }).collect();
|
||||
return items[0] ? items[0] : null; // TODO: use KeyValuePost, currently .content is from TextPost
|
||||
return items[0] ? items[0] : null;
|
||||
},
|
||||
close: () => this._pubsub.unsubscribe(channel)
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ const username = 'testrunner';
|
||||
const password = '';
|
||||
|
||||
describe('Orbit Client', function() {
|
||||
this.timeout(5000);
|
||||
this.timeout(15000);
|
||||
|
||||
let client, db;
|
||||
let items = [];
|
||||
|
@ -20,10 +20,14 @@ const startIpfs = async (() => {
|
||||
let ipfs;
|
||||
|
||||
describe('OrbitList', async(function() {
|
||||
this.timeout(5000);
|
||||
this.timeout(15000);
|
||||
|
||||
before(async((done) => {
|
||||
ipfs = await(startIpfs());
|
||||
try {
|
||||
ipfs = await(startIpfs());
|
||||
} catch(e) {
|
||||
assert.equals(e, null);
|
||||
}
|
||||
done();
|
||||
}));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user