How to use the orbit-db-test-utils.implementations.forEach function in orbit-db-test-utils

To help you get started, we’ve selected a few orbit-db-test-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github orbitdb / orbit-db-storage-adapter / test / storage.spec.js View on Github external
await store.put(d.key, JSON.stringify(d.value))
      await store.del(d.key, JSON.stringify(d.value))
      try {
        await store.get(d.key)
      } catch (e) {
        assert.strictEqual(true, true)
      }
    })
  })

  after(async () => {
    await store.close()
  })
})

implementations.forEach(implementation => {
  describe(`Storage Adapters - ${implementation.key}`, function () {
    this.timeout(timeout)

    let storage, store

    let location = implementation.fileName
    let server = implementation.server

    beforeEach(async () => {
      let storageType = implementation.module
      storage = Storage(storageType)
      if (server && server.start) await implementation.server.start({})
    })

    afterEach(async () => {
      await store.close()