@superhero/eventflow-db 4.0.4 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -28,7 +28,7 @@ export default class DB
28
28
  this.gateway = gateway
29
29
  }
30
30
 
31
- async destroy()
31
+ async close()
32
32
  {
33
33
  await this.gateway.close()
34
34
  }
package/index.test.js CHANGED
@@ -36,11 +36,12 @@ suite('@superhero/eventflow-db', async () =>
36
36
  {
37
37
  const hubs = await db.readOnlineHubs()
38
38
  assert.ok(hubs.length > 0, 'Online hubs should be returned')
39
- assert.equal(hubs[0].id, hub.id)
40
- assert.equal(hubs[0].external_ip, hub.external_ip)
41
- assert.equal(hubs[0].internal_ip, hub.internal_ip)
42
- assert.equal(hubs[0].external_port, hub.external_port)
43
- assert.equal(hubs[0].internal_port, hub.internal_port)
39
+ const onlineHub = hubs[hubs.length - 1]
40
+ assert.equal(onlineHub.id, hub.id)
41
+ assert.equal(onlineHub.external_ip, hub.external_ip)
42
+ assert.equal(onlineHub.internal_ip, hub.internal_ip)
43
+ assert.equal(onlineHub.external_port, hub.external_port)
44
+ assert.equal(onlineHub.internal_port, hub.internal_port)
44
45
  })
45
46
 
46
47
  await sub.test('Persisting an event should generate an ID if not provided', async (sub) =>
@@ -342,5 +343,5 @@ suite('@superhero/eventflow-db', async () =>
342
343
  })
343
344
  })
344
345
 
345
- after(() => db.destroy())
346
+ after(() => db.close())
346
347
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-db",
3
- "version": "4.0.4",
3
+ "version": "4.1.0",
4
4
  "description": "Eventflow db is a set of common database logic in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow"