more tests

This commit is contained in:
Andre Staltz 2023-12-15 14:36:25 +02:00
parent 99c1520415
commit f38b293c76
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
1 changed files with 13 additions and 0 deletions

View File

@ -278,6 +278,19 @@ test('getTangle()', async (t) => {
})
await t.test('Tangle.slice', (t) => {
{
const msgs = tangle.slice([], [])
const texts = msgs.map((msg) => msg.data?.text)
assert.deepEqual(texts, [
'root',
reply1LoText,
reply1HiText,
'reply 2',
reply3LoText,
reply3HiText,
])
}
{
const msgs = tangle.slice([], [reply2])
const texts = msgs.map((msg) => msg.data?.text)