Use buildEvent function in more places

This commit is contained in:
Alex Gleason
2023-05-10 16:20:27 -05:00
committed by fiatjaf_
parent 67a8ee23ce
commit 82caa2aad9
3 changed files with 9 additions and 20 deletions

View File

@@ -1,10 +1,8 @@
import {parseReferences} from '.'
import { buildEvent } from './test-helpers'
test('parse mentions', () => {
let evt = {
kind: 1,
id: '',
pubkey: '',
let evt = buildEvent({
tags: [
[
'p',
@@ -25,9 +23,7 @@ test('parse mentions', () => {
],
content:
'hello #[0], have you seen #[2]? it was made by nostr:nprofile1qqsvc6ulagpn7kwrcwdqgp797xl7usumqa6s3kgcelwq6m75x8fe8yc5usxdg on nostr:nevent1qqsvc6ulagpn7kwrcwdqgp797xl7usumqa6s3kgcelwq6m75x8fe8ychxp5v4! broken #[3]',
created_at: 0,
sig: '',
}
})
expect(parseReferences(evt)).toEqual([
{