Skip to content

Commit 036fe7c

Browse files
test: wait for EOSE in NIP-04 p-tag subscription step
1 parent 908acea commit 036fe7c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/integration/features/nip-04/nip-04.feature.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Then, When, World } from '@cucumber/cucumber'
22
import { expect } from 'chai'
33
import WebSocket from 'ws'
44

5-
import { createEvent, createSubscription, sendEvent, waitForNextEvent } from '../helpers'
5+
import { createEvent, createSubscription, sendEvent, waitForEOSE, waitForNextEvent } from '../helpers'
66
import { EventKinds, EventTags } from '../../../../src/constants/base'
77
import { CommandResult } from '../../../../src/@types/messages'
88
import { Event } from '../../../../src/@types/event'
@@ -41,6 +41,7 @@ When(/^(\w+) subscribes to tag p with (\w+) pubkey$/, async function(
4141
this.parameters.subscriptions[name].push(subscription)
4242

4343
await createSubscription(ws, subscription.name, subscription.filters)
44+
await waitForEOSE(ws, subscription.name)
4445
})
4546

4647
Then(/(\w+) receives an encrypted_direct_message event from (\w+) with content "([^"]+?)" tagged for (\w+)/, async function(

0 commit comments

Comments
 (0)