mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-18 05:41:49 +01:00
test: fix tests
This commit is contained in:
parent
f3097983a0
commit
f425da08b6
@ -2,7 +2,9 @@ import chai from 'chai'
|
||||
import chaiAsPromised from 'chai-as-promised'
|
||||
import EventEmitter from 'events'
|
||||
import Sinon from 'sinon'
|
||||
import sinonChai from 'sinon-chai'
|
||||
|
||||
chai.use(sinonChai)
|
||||
chai.use(chaiAsPromised)
|
||||
|
||||
import { IncomingEventMessage, MessageType } from '../../../src/@types/messages'
|
||||
|
@ -18,13 +18,13 @@ import { EventKinds } from '../../../src/constants/base'
|
||||
describe('NIP-01', () => {
|
||||
describe('serializeEvent', () => {
|
||||
it('returns serialized event given a Nostr event', () => {
|
||||
const event: Partial<Event> = {
|
||||
const event: Event = {
|
||||
pubkey: 'pubkey',
|
||||
created_at: 1000,
|
||||
kind: EventKinds.TEXT_NOTE,
|
||||
tags: [['tag name', 'tag content']],
|
||||
content: 'content',
|
||||
}
|
||||
} as any
|
||||
|
||||
const expected: CanonicalEvent = [
|
||||
0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user