jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
12 lines (8 loc) • 349 B
text/typescript
import { $Push } from 'jest-metadata';
import type { Link } from 'jest-allure2-reporter';
import { LINKS } from '../../metadata/constants';
export const $Link = (maybeUrl: string | Link, maybeName?: string) => {
const link =
typeof maybeUrl === 'string' ? { name: maybeName ?? maybeUrl, url: maybeUrl } : maybeUrl;
$Push(LINKS, link);
};