mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
Use buildEvent function in more places
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {nip18, finishEvent, getPublicKey, Kind} from '.'
|
||||
import { buildEvent } from './test-helpers'
|
||||
|
||||
const relayUrl = 'https://relay.example.com'
|
||||
|
||||
@@ -95,15 +96,10 @@ describe('finishRepostEvent + getRepostedEventPointer + getRepostedEvent', () =>
|
||||
|
||||
describe('getRepostedEventPointer', () => {
|
||||
it('should parse an event with only an `e` tag', () => {
|
||||
const event = {
|
||||
const event = buildEvent({
|
||||
kind: Kind.Repost,
|
||||
tags: [['e', 'reposted event id', relayUrl]],
|
||||
content: '',
|
||||
created_at: 0,
|
||||
pubkey: '',
|
||||
id: '',
|
||||
sig: '',
|
||||
}
|
||||
})
|
||||
|
||||
const repostedEventPointer = nip18.getRepostedEventPointer(event)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user