(
title: string | undefined,
macros?: AvaMacro<Args, any>[],
...args: Args
)
| 144 | let hookDeclared = false; |
| 145 | let suiteOrTestDeclared = false; |
| 146 | function computeTitle<Args extends any[]>( |
| 147 | title: string | undefined, |
| 148 | macros?: AvaMacro<Args, any>[], |
| 149 | ...args: Args |
| 150 | ) { |
| 151 | for (const macro of macros ?? []) { |
| 152 | if (macro.title) { |
| 153 | title = macro.title(title, ...args); |
| 154 | } |
| 155 | } |
| 156 | assert(title); |
| 157 | // return `${ titlePrefix }${ separator }${ title }`; |
| 158 | if (titlePrefix != null && title != null) { |
| 159 | return `${titlePrefix}${separator}${title}`; |
| 160 | } |
| 161 | if (titlePrefix == null && title != null) { |
| 162 | return title; |
| 163 | } |
| 164 | } |
| 165 | function parseArgs(args: any[]) { |
| 166 | const title = |
| 167 | typeof args[0] === 'string' ? (args.shift() as string) : undefined; |
no test coverage detected
searching dependent graphs…