diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 851a64b..6f77f72 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -1,4 +1,3 @@ -const fsPromise = require('fs/promises') const test = require('tape') const { promisify: p } = require('util') @@ -19,17 +18,17 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const oldGroup = await p(oldAlice.tribes.create)({}) - t.equal(typeof oldGroup.groupId, 'string', "got a group id when creating using old bot") + t.equal(typeof oldGroup.groupId, 'string', 'got a group id when creating using old bot') const oldList = await p(oldAlice.tribes.list)() t.deepEqual(oldList, [oldGroup.groupId], 'group got listed by old bot') const oldGet = await p(oldAlice.tribes.get)(oldGroup.groupId) - t.equal(oldGet.groupId, oldGroup.groupId, "got correct groupId") - t.equal(oldGet.key, oldGroup.groupKey, "got correct key") - t.equal(typeof oldGet.scheme, "string", "got scheme") - t.equal(typeof oldGet.root, "string", "got root") + t.equal(oldGet.groupId, oldGroup.groupId, 'got correct groupId') + t.equal(oldGet.key, oldGroup.groupKey, 'got correct key') + t.equal(typeof oldGet.scheme, 'string', 'got scheme') + t.equal(typeof oldGet.root, 'string', 'got root') await p(oldAlice.close)(true) @@ -37,17 +36,17 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const newOpts = { name: 'alice', - startUnclean: true, + startUnclean: true } - //t.throws(() => { + // t.throws(() => { // NewBot(newOpts) - //}, /found an old keystore/, "Error when there's an old keystore but we don't use it") + // }, /found an old keystore/, "Error when there's an old keystore but we don't use it") const newAlice = NewBot({ ...newOpts, box2: { - path: 'tribes/keystore', + path: 'tribes/keystore' } }) @@ -60,8 +59,8 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { groupId: oldGet.groupId, writeKey: { key: oldGet.key, scheme: oldGet.scheme }, readKeys: [{ key: oldGet.key, scheme: oldGet.scheme }], - root: oldGet.root, - }, "get with new bot matches get with old bot") + root: oldGet.root + }, 'get with new bot matches get with old bot') await p(newAlice.close)() -}) \ No newline at end of file +}) diff --git a/test/helpers/test-bot.js b/test/helpers/test-bot.js index 9bce1a8..557afb8 100644 --- a/test/helpers/test-bot.js +++ b/test/helpers/test-bot.js @@ -27,10 +27,10 @@ module.exports = function TestBot (opts = {}) { ...opts, box2: { legacyMode: true, - ...opts.box2, + ...opts.box2 }, // we don't want testbot to import db2 for us, we want more granularity and control of dep versions - db1: true, + db1: true }) if (opts.debug) {