( plugin: Pick<PluginConfig, 'context'>, categories: CategoryConfig[], )
| 54 | } |
| 55 | |
| 56 | function expandCategories( |
| 57 | plugin: Pick<PluginConfig, 'context'>, |
| 58 | categories: CategoryConfig[], |
| 59 | ): CategoryConfig[] { |
| 60 | const context = validate(pluginUrlContextSchema, plugin.context); |
| 61 | if (!shouldExpandForUrls(context.urlCount)) { |
| 62 | return categories; |
| 63 | } |
| 64 | return categories.map(category => |
| 65 | expandAggregatedCategory(category, context), |
| 66 | ); |
| 67 | } |
| 68 | |
| 69 | export function expandAggregatedCategory( |
| 70 | category: CategoryConfig, |
no test coverage detected