mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-13 10:28:51 +00:00
Use buildEvent function in more places
This commit is contained in:
@@ -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([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user