From 89cf8a10c1d344b3ca0a8a15c9bfa92c4a923b51 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Mon, 22 Jan 2024 18:02:51 +0100 Subject: [PATCH] Adjust tests to new fixtures --- test/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/index.js b/test/index.js index 4ca883d..918f122 100644 --- a/test/index.js +++ b/test/index.js @@ -69,7 +69,7 @@ test('exact chain-of-words', (t) => { pull.filter((msg) => msg.value.content.text.toLowerCase().includes(INPUT)), pull.collect((err, msgs) => { t.error(err, 'no error'); - t.equals(msgs.length, 4, 'four posts'); + t.equals(msgs.length, 2, 'two posts'); sbot.close(true, t.end); }), ); @@ -91,9 +91,9 @@ test('word prefix', (t) => { t.false(/\blabo\b/i.test(msg.value.content.text), 'labo is not found'); const matches = [...msg.value.content.text.matchAll(/labo/gi)]; t.true(msg.value.content.text.includes('labo'), 'labo prefix is found'); - t.equals(matches.length, 3, '3 matches'); + t.equals(matches.length, 2, '2 matches'); const matchPositions = matches.map((m) => m.index); - t.deepEquals(matchPositions, [47, 55, 168], 'labo positions found'); + t.deepEquals(matchPositions, [160, 168], 'labo positions found'); setTimeout(()=> { sbot.close(true, t.end); },1000)