(trackComponents: string[], formattedName: string)
| 47 | |
| 48 | /** Find if the current component exists in the provided `TracingOptions.trackComponents` array option. */ |
| 49 | export function findTrackComponent(trackComponents: string[], formattedName: string): boolean { |
| 50 | function extractComponentName(name: string): string { |
| 51 | return name.replace(/^<([^\s]*)>(?: at [^\s]*)?$/, '$1'); |
| 52 | } |
| 53 | |
| 54 | const isMatched = trackComponents.some(compo => { |
| 55 | return extractComponentName(formattedName) === extractComponentName(compo); |
| 56 | }); |
| 57 | |
| 58 | return isMatched; |
| 59 | } |
| 60 | |
| 61 | export const createTracingMixins = (options: Partial<TracingOptions> = {}): Mixins => { |
| 62 | const hooks = (options.hooks || []) |
no test coverage detected