-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust tests to new fixtures #4
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'); | ||
Comment on lines
-94
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think this is the message it's running on {"key":"%rEpV0vnOoBuO01jmBb90H4Af/FmxTasGV0+otihgN8s=.sha256","value":{"previous":null,"sequence":1,"author":"@J74J+ctsqJNREBjVqvc/oeSVWNRrGcrfH54ERGQtqwI=.ed25519","timestamp":17059425
45831,"hash":"sha256","content":{"type":"post","text":"OLDESTMSG reprehenderit officia ad","c
hannel":"mollit","mentions":[{"link":"@3rJVBV5zDW8wgCEjAHBgNAkiE2c+HJf2XIsU6aND3Z8=.ed25519","name":"laborum laboris reprehenderit"},{"link":"&ZGVzZXJ1bnRsYWJvcmVvY2NhZWNhdGR1aXNuaXNpZXg=.sha256","type":"image/png","size":1220163},{"link":"@n7mkSt+3MKjSP5S8R6lJx2ixZKefldZ8GuyyBbtNCY4=.ed25519","name":"magna est"},{"link":"@QxRm+ZF6ZmZtMRDbdTvSL5FVG8XjiP0m5qHqRnSIacI=.ed25519","name":"nostrud"}]},"signature":"BAiI3JmQM7ZVkZbQdvLvHIFTgM2zltmUHzcxRF9kkQpLPcKvSTbbaH67Hl0i1XHBgb5vzNUltDoV57iRMjzaAA==.sig.ed25519"},"timestamp":1705942545832} the matching text seems to be at sort of 160 and 168 chars into the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know either what's going on, but it's fine by me 🤷 |
||
setTimeout(()=> { | ||
sbot.close(true, t.end); | ||
},1000) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(there are multiple messages on each line but i verified by looking at the results in
less
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried finding a search with a few more results but i could only find searches with either 1-2 results or like 30+ (which would be harder to verify)