Remove leading './' from path if present

This commit is contained in:
phillmac 2019-11-08 19:04:01 +11:00
parent 616c4c1c33
commit fcd1e801ec

View File

@ -53,7 +53,7 @@ Object.keys(testAPIs).forEach(API => {
describe('addDatabaseType', function () {
it('should have the correct custom type', async () => {
OrbitDB.addDatabaseType(CustomStore.type, CustomStore)
let store = await orbitdb.create(dbPath, CustomStore.type)
let store = await orbitdb.create(dbPath.replace(/^\.\//, ''), CustomStore.type)
assert.equal(store._type, CustomStore.type)
})