mirror of https://codeberg.org/pzp/pzp-db.git
more tests
This commit is contained in:
parent
99c1520415
commit
f38b293c76
|
@ -278,6 +278,19 @@ test('getTangle()', async (t) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
await t.test('Tangle.slice', (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 msgs = tangle.slice([], [reply2])
|
||||||
const texts = msgs.map((msg) => msg.data?.text)
|
const texts = msgs.map((msg) => msg.data?.text)
|
||||||
|
|
Loading…
Reference in New Issue