8 lines
308 B
TypeScript
8 lines
308 B
TypeScript
|
import { NostrEvent } from '@nostrify/nostrify';
|
||
|
|
||
|
/** Import an event fixture by name in tests. */
|
||
|
export async function eventFixture(name: string): Promise<NostrEvent> {
|
||
|
const result = await import(`~/fixtures/events/${name}.json`, { with: { type: 'json' } });
|
||
|
return structuredClone(result.default);
|
||
|
}
|