Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Cache = require('orbit-db-cache')
const Keystore = require('orbit-db-keystore')
const IdentityProvider = require('orbit-db-identity-provider')
const DefaultOptions = Store.DefaultOptions
// Test utils
const {
config,
testAPIs,
startIpfs,
stopIpfs,
implementations
} = require('orbit-db-test-utils')
const properLevelModule = implementations.filter(i => i.key.indexOf('memdown') > -1).map(i => i.module)[0]
const storage = require('orbit-db-storage-adapter')(properLevelModule)
Object.keys(testAPIs).forEach((IPFS) => {
describe(`Constructor ${IPFS}`, function () {
let ipfs, identityProvider, testIdentity, identityStore, store, storeWithCache, cacheStore
this.timeout(config.timeout)
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-entry' + new Date().getTime()
})
before(async () => {
identityStore = await storage.createStore('identity')
const keystore = new Keystore(identityStore)
const Cache = require('orbit-db-cache')
const Keystore = require('orbit-db-keystore')
const IdentityProvider = require('orbit-db-identity-provider')
const DefaultOptions = Store.DefaultOptions
// Test utils
const {
config,
testAPIs,
startIpfs,
stopIpfs,
implementations
} = require('orbit-db-test-utils')
const properLevelModule = implementations.filter(i => i.key.indexOf('memdown') > -1).map(i => i.module)[0]
const storage = require('orbit-db-storage-adapter')(properLevelModule)
Object.keys(testAPIs).forEach((IPFS) => {
describe(`Snapshots ${IPFS}`, function () {
let ipfs, testIdentity, identityStore, store, cacheStore
this.timeout(config.timeout)
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-entry' + new Date().getTime()
})
before(async () => {
identityStore = await storage.createStore('identity')
const keystore = new Keystore(identityStore)
const Cache = require('orbit-db-cache')
const Keystore = require('orbit-db-keystore')
const IdentityProvider = require('orbit-db-identity-provider')
const DefaultOptions = Store.DefaultOptions
// Test utils
const {
config,
testAPIs,
startIpfs,
stopIpfs,
implementations
} = require('orbit-db-test-utils')
const properLevelModule = implementations.filter(i => i.key.indexOf('memdown') > -1).map(i => i.module)[0]
const storage = require('orbit-db-storage-adapter')(properLevelModule)
Object.keys(testAPIs).forEach((IPFS) => {
describe(`addOperation ${IPFS}`, function () {
let ipfs, testIdentity, identityStore, store, cacheStore
this.timeout(config.timeout)
const ipfsConfig = Object.assign({}, config.defaultIpfsConfig, {
repo: config.defaultIpfsConfig.repo + '-entry' + new Date().getTime()
})
before(async () => {
identityStore = await storage.createStore('identity')
const keystore = new Keystore(identityStore)