Closed patrickReiis closed 3 months ago
What do you think? @staab
The original text is concise. An example helps, but I'm not sure it belongs there.
Maybe it would make more sense to put a bulleted list of some examples at the end of the section, similar to the relay "OK" message examples.
Maybe it's time we do test cases for NIPs?
I was thinking the same @Semisol
How would tests look like? Using this merge request as an example.
I would loooove to see gherkin tests for NIPs (either along each NIP or maybe in a separate repo?) This is a sample test from nostream:
Feature: NIP-01
Scenario: Alice gets an event by ID
Given someone called Alice
And someone called Bob
When Bob sends a text_note event with content "why is nobody talking about this?"
And Alice subscribes to last event from Bob
Then Alice receives a text_note event from Bob with content "why is nobody talking about this?"
I'm sure this could be adapted to cover the filter matching
I wrote a few NIP-01 gherkin tests for my Netstr project, check them out: https://github.com/bezysoftware/netstr/blob/main/test/Netstr.Tests/NIPs/01.feature
I didn't understand it first time when I read the current explanation, I think with this merge request it'll be easier for people with no nostr experience to understand it first time.