mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
Refactor imports: use file extension, improve tree shaking, update tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {nip10} from '.'
|
||||
import {parse} from './nip10.ts'
|
||||
|
||||
describe('parse NIP10-referenced events', () => {
|
||||
test('legacy + a lot of events', () => {
|
||||
@@ -47,7 +47,7 @@ describe('parse NIP10-referenced events', () => {
|
||||
]
|
||||
}
|
||||
|
||||
expect(nip10.parse(event)).toEqual({
|
||||
expect(parse(event)).toEqual({
|
||||
mentions: [
|
||||
{
|
||||
id: 'bbd72f0ae14374aa8fb166b483cfcf99b57d7f4cf1600ccbf17c350040834631',
|
||||
@@ -128,7 +128,7 @@ describe('parse NIP10-referenced events', () => {
|
||||
]
|
||||
}
|
||||
|
||||
expect(nip10.parse(event)).toEqual({
|
||||
expect(parse(event)).toEqual({
|
||||
mentions: [
|
||||
{
|
||||
id: 'bbd72f0ae14374aa8fb166b483cfcf99b57d7f4cf1600ccbf17c350040834631',
|
||||
@@ -189,7 +189,7 @@ describe('parse NIP10-referenced events', () => {
|
||||
]
|
||||
}
|
||||
|
||||
expect(nip10.parse(event)).toEqual({
|
||||
expect(parse(event)).toEqual({
|
||||
mentions: [],
|
||||
profiles: [
|
||||
{
|
||||
@@ -233,7 +233,7 @@ describe('parse NIP10-referenced events', () => {
|
||||
]
|
||||
}
|
||||
|
||||
expect(nip10.parse(event)).toEqual({
|
||||
expect(parse(event)).toEqual({
|
||||
mentions: [],
|
||||
profiles: [
|
||||
{
|
||||
@@ -302,7 +302,7 @@ describe('parse NIP10-referenced events', () => {
|
||||
]
|
||||
}
|
||||
|
||||
expect(nip10.parse(event)).toEqual({
|
||||
expect(parse(event)).toEqual({
|
||||
mentions: [],
|
||||
profiles: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user