mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
we need websocket polyfill on relay tests.
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
"node-fetch": "2",
|
||||
"ts-jest": "^29.0.3",
|
||||
"tsd": "^0.22.0",
|
||||
"typescript": "^4.9.4"
|
||||
"typescript": "^4.9.4",
|
||||
"websocket-polyfill": "^0.0.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build.js",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-env jest */
|
||||
|
||||
require('websocket-polyfill')
|
||||
const {
|
||||
relayInit,
|
||||
generatePrivateKey,
|
||||
@@ -8,7 +9,6 @@ const {
|
||||
signEvent
|
||||
} = require('./lib/nostr.cjs')
|
||||
|
||||
describe('relay interaction', () => {
|
||||
let relay = relayInit('wss://nostr-pub.semisol.dev/')
|
||||
|
||||
beforeAll(() => {
|
||||
@@ -38,9 +38,7 @@ describe('relay interaction', () => {
|
||||
|
||||
let sub = relay.sub([
|
||||
{
|
||||
ids: [
|
||||
'd7dd5eb3ab747e16f8d0212d53032ea2a7cadef53837e5a6c66d42849fcb9027'
|
||||
]
|
||||
ids: ['d7dd5eb3ab747e16f8d0212d53032ea2a7cadef53837e5a6c66d42849fcb9027']
|
||||
}
|
||||
])
|
||||
sub.on('event', event => {
|
||||
@@ -114,4 +112,3 @@ describe('relay interaction', () => {
|
||||
])
|
||||
).resolves.toEqual([true, true])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user