delete some unnecessary code from mock-relay implementation.

This commit is contained in:
fiatjaf
2024-01-20 12:48:42 -03:00
parent 967d7fe63a
commit 2f0ef90bd5
4 changed files with 28 additions and 89 deletions

View File

@@ -6,11 +6,11 @@ import { MockRelay } from './test-helpers.ts'
test('auth flow', async () => {
const mockRelay = new MockRelay()
const relay = await Relay.connect(mockRelay.getUrl())
const relay = await Relay.connect(mockRelay.url)
const auth = makeAuthEvent(relay.url, 'chachacha')
expect(auth.tags).toHaveLength(2)
expect(auth.tags[0]).toEqual(['relay', mockRelay.getUrl()])
expect(auth.tags[0]).toEqual(['relay', mockRelay.url])
expect(auth.tags[1]).toEqual(['challenge', 'chachacha'])
expect(auth.kind).toEqual(22242)
})