(context: string, previewContext: string)
| 312 | * otherwise checks for inclusion of a value from `PREVIEW_CONTEXT_KEYWORDS`. |
| 313 | */ |
| 314 | export function isPreviewContext(context: string, previewContext: string) { |
| 315 | if (previewContext) { |
| 316 | return context === previewContext; |
| 317 | } |
| 318 | return PREVIEW_CONTEXT_KEYWORDS.some(keyword => context.includes(keyword)); |
| 319 | } |
| 320 | |
| 321 | export enum PreviewState { |
| 322 | Other = 'other', |
no test coverage detected