mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
revert nip11.test.ts with a todo flag
This commit is contained in:
@@ -2,13 +2,14 @@ import { describe, test, expect } from 'bun:test'
|
|||||||
import fetch from 'node-fetch'
|
import fetch from 'node-fetch'
|
||||||
import { useFetchImplementation, fetchRelayInformation } from './nip11'
|
import { useFetchImplementation, fetchRelayInformation } from './nip11'
|
||||||
|
|
||||||
|
// TODO: replace with a mock
|
||||||
describe('requesting relay as for NIP11', () => {
|
describe('requesting relay as for NIP11', () => {
|
||||||
useFetchImplementation(fetch)
|
useFetchImplementation(fetch)
|
||||||
|
|
||||||
test('testing a relay', async () => {
|
test('testing a relay', async () => {
|
||||||
const info = await fetchRelayInformation('wss://atlas.nostr.land')
|
const info = await fetchRelayInformation('wss://atlas.nostr.land')
|
||||||
expect(info.name).toEqual('nostr.land')
|
expect(info.name).toEqual('nostr.land')
|
||||||
expect(info.description).toEqual('nostr.land family of relays (fi-01 [leopard])')
|
expect(info.description).toEqual('nostr.land family of relays (us-or-01)')
|
||||||
expect(info.fees).toBeTruthy()
|
expect(info.fees).toBeTruthy()
|
||||||
expect(info.supported_nips).toEqual([1, 2, 4, 9, 11, 12, 16, 20, 22, 28, 33, 40])
|
expect(info.supported_nips).toEqual([1, 2, 4, 9, 11, 12, 16, 20, 22, 28, 33, 40])
|
||||||
expect(info.software).toEqual('custom')
|
expect(info.software).toEqual('custom')
|
||||||
|
|||||||
Reference in New Issue
Block a user