From 92946585bb033cfabdc98e562d0a8e1c96adc46d Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 11:03:02 +0200 Subject: [PATCH 01/15] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Staltz --- index.js | 2 +- lib/get-group-tangle.js | 1 - test/get-group-tangle.test.js | 26 +++++++++++++------------- test/helpers/testbot.js | 2 -- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/index.js b/index.js index 3fce2ce..fe62ae2 100644 --- a/index.js +++ b/index.js @@ -159,7 +159,7 @@ module.exports = { if (err) return cb(err) ssb.db.create( - { content, recps, encryptionFormat: 'box2' }, + { content, encryptionFormat: 'box2' }, (err, msg) => { if (err) return cb(err) diff --git a/lib/get-group-tangle.js b/lib/get-group-tangle.js index 58ba75d..2ac22f8 100644 --- a/lib/get-group-tangle.js +++ b/lib/get-group-tangle.js @@ -48,7 +48,6 @@ module.exports = function GetGroupTangle(server) { previous: Object.keys(reduce.state), }) }) - //) }) } } diff --git a/test/get-group-tangle.test.js b/test/get-group-tangle.test.js index 6d97290..f8b4ab6 100644 --- a/test/get-group-tangle.test.js +++ b/test/get-group-tangle.test.js @@ -16,12 +16,12 @@ test('get-group-tangle unit test', (t) => { const server = Testbot({ name }) server.tribes2.create(null, (err, group) => { - if (err) throw err + t.error(err, 'no error') const getGroupTangle = GetGroupTangle(server) getGroupTangle(group.id, (err, groupTangle) => { - if (err) throw err + t.error(err, 'no error') const { root, previous } = groupTangle const rootKey = group.root @@ -31,7 +31,7 @@ test('get-group-tangle unit test', (t) => { pull.map((m) => m.key), pull.take(1), pull.collect((err, keys) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( { root, previous }, @@ -48,10 +48,10 @@ test('get-group-tangle unit test', (t) => { } server.tribes2.publish(content, (err, msg) => { - if (err) throw err + t.error(err, 'no error') getGroupTangle(group.id, (err, { root, previous }) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( { root, previous }, { root: rootKey, previous: [msg.key] }, @@ -59,10 +59,10 @@ test('get-group-tangle unit test', (t) => { ) server.tribes2.publish(content, (err, msg) => { - if (err) throw err + t.error(err, 'no error') getGroupTangle(group.id, (err, { root, previous }) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( { root, previous }, { root: rootKey, previous: [msg.key] }, @@ -85,7 +85,7 @@ test(`get-group-tangle-${n}-publishes`, (t) => { const server = Testbot() let count = 0 server.tribes2.create(null, (err, data) => { - if (err) throw err + t.error(err, 'no error') const groupId = data.id pull( @@ -174,7 +174,7 @@ test('get-group-tangle with branch', (t) => { // Alice creates a group alice.tribes2.create(null, (err, group) => { - if (err) throw err + t.error(err, 'no error') const getAliceGroupTangle = GetGroupTangle(alice) const getBobGroupTangle = GetGroupTangle(bob) @@ -191,9 +191,9 @@ test('get-group-tangle with branch', (t) => { // Both servers should see the same group tangle getAliceGroupTangle(group.id, (err, aliceTangle) => { - if (err) throw err + t.error(err, 'no error') getBobGroupTangle(group.id, (err, bobTangle) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual(aliceTangle, bobTangle, 'tangles should match') t.deepEqual(aliceTangle.root, group.root, 'the root is the groupId') t.deepEqual( @@ -213,12 +213,12 @@ test('get-group-tangle with branch', (t) => { t.error(err, 'alice publishes a new message') bob.tribes2.publish(content(), async (err) => { - if (err) throw err + t.error(err, 'no error') // Then Bob shares his message with Alice await replicate(bob, alice) // There should now be a branch in Alice's group tangle getAliceGroupTangle(group.id, (err, aliceTangle) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( aliceTangle.previous.length, diff --git a/test/helpers/testbot.js b/test/helpers/testbot.js index e426f6c..710c10e 100644 --- a/test/helpers/testbot.js +++ b/test/helpers/testbot.js @@ -25,8 +25,6 @@ module.exports = function createSbot(opts = {}) { .use(require('ssb-db2/core')) .use(require('ssb-classic')) .use(require('ssb-box2')) - //.use(require('ssb-db2/compat/db')) - //.use(require('ssb-db2/compat/history-stream')) .use(require('ssb-db2/compat/feedstate')) .use(require('ssb-db2/compat/ebt')) .use(require('ssb-ebt')) From 5b54e9d4230ada996ba426bc979a77c4bb67cdff Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 14:14:26 +0200 Subject: [PATCH 02/15] Remove old comment --- test/get-group-tangle.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/get-group-tangle.test.js b/test/get-group-tangle.test.js index f8b4ab6..3a0bc5b 100644 --- a/test/get-group-tangle.test.js +++ b/test/get-group-tangle.test.js @@ -103,7 +103,6 @@ test(`get-group-tangle-${n}-publishes`, (t) => { (err) => { t.error(err, 'no error') - // t.equal(count, n, 'We expect there to be no branches in our groupTangle') t.true( count < n * 8, 'We expect bounded branching with fast publishing' From 91cd5a384759bdd738dda3f20898cf82e1563f9f Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 14:17:47 +0200 Subject: [PATCH 03/15] Remove weird unused test loop --- test/get-group-tangle.test.js | 63 +++++++++++++---------------------- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/test/get-group-tangle.test.js b/test/get-group-tangle.test.js index 3a0bc5b..0cf4959 100644 --- a/test/get-group-tangle.test.js +++ b/test/get-group-tangle.test.js @@ -116,53 +116,38 @@ test(`get-group-tangle-${n}-publishes`, (t) => { }) test('get-group-tangle', (t) => { - const tests = [ - { - plan: 4, - test: (t) => { - const DESCRIPTION = 'auto adds group tangle' - // this is an integration test, as get-group-tangle is used in ssb.tribes2.publish - const ssb = Testbot() + t.plan(4) - ssb.tribes2.create(null, (err, data) => { - t.error(err, 'create group') + // this is an integration test, as get-group-tangle is used in ssb.tribes2.publish + const ssb = Testbot() - const groupRoot = data.root - const groupId = data.id + ssb.tribes2.create(null, (err, data) => { + t.error(err, 'create group') - const content = { - type: 'yep', - recps: [groupId], - } - - ssb.tribes2.publish(content, (err, msg) => { - t.error(err, 'publish a message') - - ssb.db.get(msg.key, (err, A) => { - t.error(err, 'get that message back') + const groupRoot = data.root + const groupId = data.id - t.deepEqual( - A.content.tangles.group, // actual - { root: groupRoot, previous: [groupRoot] }, // expected - DESCRIPTION + ' (auto added tangles.group)' - ) + const content = { + type: 'yep', + recps: [groupId], + } - ssb.close() - }) - }) - }) - }, - }, - ] + ssb.tribes2.publish(content, (err, msg) => { + t.error(err, 'publish a message') - const toRun = tests.reduce((acc, round) => { - acc += round.plan || 1 - return acc - }, 0) + ssb.db.get(msg.key, (err, A) => { + t.error(err, 'get that message back') - t.plan(toRun) + t.deepEqual( + A.content.tangles.group, // actual + { root: groupRoot, previous: [groupRoot] }, // expected + 'auto adds group tangle (auto added tangles.group)' + ) - tests.forEach((round) => round.test(t)) + ssb.close(true) + }) + }) + }) }) test('get-group-tangle with branch', (t) => { From 11f57f05d749ccd7395dc27860b40ce44a4ec6f1 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 14:22:20 +0200 Subject: [PATCH 04/15] Remove commented code in GetUpdates --- lib/get-group-tangle.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/get-group-tangle.js b/lib/get-group-tangle.js index 2ac22f8..088bbaa 100644 --- a/lib/get-group-tangle.js +++ b/lib/get-group-tangle.js @@ -59,9 +59,6 @@ const B_ROOT = Buffer.from('root') function GetUpdates(ssb) { const { seekKey } = require('bipf') - //const { spec } = crut - //const isUpdate = (msg) => - // crut.isUpdate(getCanonicalContent(msg, spec.getTransformation)) const B_TANGLE = Buffer.from('group') function tangleRoot(value) { @@ -86,8 +83,6 @@ function GetUpdates(ssb) { const { where, and, toPullStream } = ssb.db.operators pull( ssb.db.query(where(and(tangleRoot(id))), toPullStream()), - //TODO: do we want this? - //pull.filter(isUpdate), pull.collect(cb) ) } From 5e7f68cfccc6cbee5d7c0cb9781ee07ec14af7bf Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 14:54:43 +0200 Subject: [PATCH 05/15] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Staltz --- test/add-member.test.js | 4 +++- test/create.test.js | 9 ++++----- test/list-and-get.test.js | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/test/add-member.test.js b/test/add-member.test.js index 866196e..b020c3c 100644 --- a/test/add-member.test.js +++ b/test/add-member.test.js @@ -113,5 +113,7 @@ test('add member', async (t) => { t.fail(err) } - kaitiaki.close(true, () => newPerson.close(true)) + await new Promise((resolve) => { + kaitiaki.close(true, () => newPerson.close(true, resolve)) + }) }) diff --git a/test/create.test.js b/test/create.test.js index ab49b49..00cc662 100644 --- a/test/create.test.js +++ b/test/create.test.js @@ -47,7 +47,7 @@ test('create more', (t) => { // this is more of an integration test over the api server.tribes2.create({}, (err, data) => { - if (err) throw err + t.error(err, 'no error') const { id, secret, root } = data t.true(ref.isCloakedMsg(id), 'returns group identifier - groupId') @@ -63,7 +63,7 @@ test('create more', (t) => { //) server.db.get(root, (err, value) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( value.content, @@ -81,7 +81,7 @@ test('create more', (t) => { server.db.query(where(author(server.id)), descending(), toPullStream()), pull.map((msg) => msg.value.content), pull.collect((err, msgContents) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( msgContents[0], // contents of the latest message @@ -104,8 +104,7 @@ test('create more', (t) => { }, 'The admin was was also added to the group' ) - server.close() - t.end() + server.close(true, t.end) }) ) }) diff --git a/test/list-and-get.test.js b/test/list-and-get.test.js index f38da44..018a3d6 100644 --- a/test/list-and-get.test.js +++ b/test/list-and-get.test.js @@ -19,7 +19,7 @@ test('tribes.list + tribes.get', (t) => { pull( server.tribes2.list(), pull.collect(async (err, list) => { - if (err) return t.error(err) + t.error(err, 'no error') const expectedGroup = { secret: group.secret, @@ -30,7 +30,7 @@ test('tribes.list + tribes.get', (t) => { t.deepEqual(list, [expectedGroup], 'lists group ids') server.tribes2.get(group.id, (err, actualGroup) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual(actualGroup, expectedGroup, 'gets group data') @@ -41,7 +41,7 @@ test('tribes.list + tribes.get', (t) => { pull( server.tribes2.list(), pull.collect((err, newList) => { - if (err) throw err + t.error(err, 'no error') t.deepEqual( newList, @@ -115,7 +115,7 @@ test('list', (t) => { pull( ssb.tribes2.list(), pull.collect(async (err, groups1) => { - if (err) t.error(err) + t.error(err, 'no error') t.equal(groups1.length, 1, 'lists the 1 group') @@ -124,7 +124,7 @@ test('list', (t) => { pull( ssb.tribes2.list(), pull.collect(async (err, groups2) => { - if (err) return t.error(err) + t.error(err, 'no error') t.equal(groups2.length, 2) t.equal(groups2[0].id, id1) From a2045490f81bafbbaf3812de685e8b92e10b1eb3 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 16:06:45 +0200 Subject: [PATCH 06/15] Allow console.error --- .eslintrc.js | 4 +++- index.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9de9007..0ab6a55 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,5 +16,7 @@ module.exports = { ecmaVersion: 2018, sourceType: 'module', }, - rules: {}, + rules: { + 'no-console': ['error', { allow: ['error'] }], + }, } diff --git a/index.js b/index.js index f696d52..0a008b4 100644 --- a/index.js +++ b/index.js @@ -191,7 +191,8 @@ module.exports = { const groupId = lodashGet(msg, 'value.content.recps[0]') ssb.box2.getGroupKeyInfo(groupId, (err, info) => { - if (err) throw err + if (err) + console.error('Error when finding group invite for me:', err) if (!info) { // we're not already in the group From 7625704b35012b5a8b94626b132fdbffa9cbe1a7 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 16:09:02 +0200 Subject: [PATCH 07/15] Move from assign to declaration --- test/add-member.test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/add-member.test.js b/test/add-member.test.js index b020c3c..b1037b9 100644 --- a/test/add-member.test.js +++ b/test/add-member.test.js @@ -72,12 +72,14 @@ test('add member', async (t) => { recps: [group.id, ...authorIds], tangles: { - group: { root: group.root }, + group: { + root: group.root, + // we don't know the key of the last message, that was the admin adding themselves + previous: invite.content.tangles.group.previous, + }, members: { root: group.root, previous: [group.root] }, }, } - // we don't know the key of the last message, that was the admin adding themselves - expected.tangles.group.previous = invite.content.tangles.group.previous t.deepEqual(invite.content, expected, 'kaitiaki sent invite') /* kaitiaki posts to group, new person can read */ From 32d66c33f7afbc71822eb00601a5611b5aeac1d7 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 16:13:01 +0200 Subject: [PATCH 08/15] Don't use let --- test/add-member.test.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/add-member.test.js b/test/add-member.test.js index b1037b9..17207f4 100644 --- a/test/add-member.test.js +++ b/test/add-member.test.js @@ -44,7 +44,7 @@ test('get added to a group', async (t) => { ) }) -test('add member', async (t) => { +test.only('add member', async (t) => { const kaitiaki = Testbot() const newPerson = Testbot() kaitiaki.tribes2.start() @@ -56,11 +56,15 @@ test('add member', async (t) => { const authorIds = [newPerson.id, ssbKeys.generate().id] - let invite = await kaitiaki.tribes2.addMembers(group.id, authorIds, { - text: 'welcome friends', - }) + const encryptedInvite = await kaitiaki.tribes2.addMembers( + group.id, + authorIds, + { + text: 'welcome friends', + } + ) - invite = await p(kaitiaki.db.get)(invite.key) + const invite = await p(kaitiaki.db.get)(encryptedInvite.key) const expected = { type: 'group/add-member', From 7ba399bf56ef4a5716b9d520ab7e61886d93fb17 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 16:24:30 +0200 Subject: [PATCH 09/15] Run logic in asyncMap instead of drain --- index.js | 16 ++++++++++++---- test/add-member.test.js | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 0a008b4..aedfeb4 100644 --- a/index.js +++ b/index.js @@ -179,7 +179,7 @@ module.exports = { live({ old: true }), toPullStream() ), - pull.drain((msg) => { + pull.asyncMap((msg, cb) => { // TODO: check if we already have this msg' group key in ssb-box2 // TODO: if we do, ignore this msg // TODO: else, register the group key in ssb-box2 @@ -191,8 +191,12 @@ module.exports = { const groupId = lodashGet(msg, 'value.content.recps[0]') ssb.box2.getGroupKeyInfo(groupId, (err, info) => { - if (err) - console.error('Error when finding group invite for me:', err) + if (err) { + return console.error( + 'Error when finding group invite for me:', + err + ) + } if (!info) { // we're not already in the group @@ -201,9 +205,13 @@ module.exports = { root: groupRoot, }) } + return cb() }) + } else { + return cb() } - }) + }), + pull.drain(() => {}) ) //pull( diff --git a/test/add-member.test.js b/test/add-member.test.js index 17207f4..a0a065b 100644 --- a/test/add-member.test.js +++ b/test/add-member.test.js @@ -44,7 +44,7 @@ test('get added to a group', async (t) => { ) }) -test.only('add member', async (t) => { +test('add member', async (t) => { const kaitiaki = Testbot() const newPerson = Testbot() kaitiaki.tribes2.start() From 79ca22ad5d5e4721ce29590598e883a199501e5c Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Fri, 7 Oct 2022 16:30:44 +0200 Subject: [PATCH 10/15] Delete commented code --- test/create.test.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/create.test.js b/test/create.test.js index 00cc662..fad5286 100644 --- a/test/create.test.js +++ b/test/create.test.js @@ -55,12 +55,6 @@ test('create more', (t) => { Buffer.isBuffer(secret) && secret.length === 32, 'returns group symmetric key - groupKey' ) - //TODO: can we get the root msg unencrypted? - //t.match( - // groupInitMsg.value.content, - // /^[a-zA-Z0-9/+]+=*\.box2$/, - // 'encrypted init msg' - //) server.db.get(root, (err, value) => { t.error(err, 'no error') From 227e7c578897852addf9ba0794a363bd55c6f2a0 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 12 Oct 2022 16:05:53 +0200 Subject: [PATCH 11/15] Test tangle previous correctly --- test/get-group-tangle.test.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/test/get-group-tangle.test.js b/test/get-group-tangle.test.js index 256043d..7ab3a36 100644 --- a/test/get-group-tangle.test.js +++ b/test/get-group-tangle.test.js @@ -116,8 +116,6 @@ test(`get-group-tangle-${n}-publishes`, (t) => { }) test('get-group-tangle', (t) => { - t.plan(4) - // this is an integration test, as get-group-tangle is used in ssb.tribes2.publish const ssb = Testbot() @@ -132,22 +130,22 @@ test('get-group-tangle', (t) => { recps: [groupId], } - ssb.tribes2.publish(content, (err, msg) => { - t.error(err, 'publish a message') + ssb.db.onMsgAdded((lastMsgAfterCreate) => { + ssb.tribes2.publish(content, (err, msg) => { + t.error(err, 'publish a message') - ssb.db.get(msg.key, (err, A) => { - t.error(err, 'get that message back') + ssb.db.get(msg.key, (err, A) => { + t.error(err, 'get that message back') - //TODO: this is confusing, why is previous supposed to be groupRoot? because right after creating the group we add ourselves to the group, which creates another message, so that message should be the previous - //t.deepEqual( - // A.content.tangles.group, // actual - // { root: groupRoot, previous: [groupRoot] }, // expected - // 'auto adds group tangle (auto added tangles.group)' - //) - //TODO: remove - t.equal(1, 1) + t.deepEqual( + A.content.tangles.group, // actual + // last message is the admin adding themselves to the group they just created i.e. not the root msg + { root: groupRoot, previous: [lastMsgAfterCreate.kvt.key] }, // expected + 'auto adds group tangle (auto added tangles.group)' + ) - ssb.close(true) + ssb.close(true, t.end) + }) }) }) }) From 58181cda730f310c7e9aaf4a1e9fa292cb3699fa Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 12 Oct 2022 16:21:19 +0200 Subject: [PATCH 12/15] Update ebt to fix ci install --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e59ccbf..bf8a061 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "secret-stack": "^6.4.1", "ssb-caps": "^1.1.0", "ssb-db2": "^6.2.0", - "ssb-ebt": "^9.1.0", + "ssb-ebt": "^9.1.2", "tap-arc": "^0.3.4", "tape": "^5.5.3" }, From 4f87333ba8916225d5edede14f19da732de0af51 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 12 Oct 2022 16:26:52 +0200 Subject: [PATCH 13/15] Remove old commented code --- index.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/index.js b/index.js index f13978c..5961153 100644 --- a/index.js +++ b/index.js @@ -224,17 +224,6 @@ module.exports = { }), pull.drain(() => {}) ) - - //pull( - // ssb.db.query(live({ old: true }), toPullStream()), - // pull.drain((msg) => { - // console.log('i got any kind of message', { - // author: msg.value.author, - // seq: msg.value.sequence, - // myId: ssb.id, - // }) - // }) - //) } return { From 5224eb57624e927bc44a5a5b41bc32a972c1af10 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 12 Oct 2022 16:28:42 +0200 Subject: [PATCH 14/15] Add license header --- test/list-members.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/list-members.test.js b/test/list-members.test.js index b9f7665..aeea557 100644 --- a/test/list-members.test.js +++ b/test/list-members.test.js @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2022 Mix Irving +// +// SPDX-License-Identifier: LGPL-3.0-only + const test = require('tape') const keys = require('ssb-keys') const Testbot = require('./helpers/testbot') From 8f55ab65d2626e66ff54411c7456823fb203e405 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 12 Oct 2022 16:34:54 +0200 Subject: [PATCH 15/15] Clearer test errors --- test/get-group-tangle.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/get-group-tangle.test.js b/test/get-group-tangle.test.js index 7ab3a36..d1c68e5 100644 --- a/test/get-group-tangle.test.js +++ b/test/get-group-tangle.test.js @@ -85,7 +85,7 @@ test(`get-group-tangle-${n}-publishes`, (t) => { const server = Testbot() let count = 0 server.tribes2.create(null, (err, data) => { - t.error(err, 'no error') + t.error(err, 'no error creating group') const groupId = data.id pull( @@ -101,7 +101,7 @@ test(`get-group-tangle-${n}-publishes`, (t) => { count += m.value.content.tangles.group.previous.length }, (err) => { - t.error(err, 'no error') + t.error(err, 'no error publishing') t.true( count < n * 8,