(stylesheet: string, selector: string)
| 19 | } |
| 20 | |
| 21 | function extractBlock(stylesheet: string, selector: string): string { |
| 22 | const escapedSelector = selector.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); |
| 23 | const match = stylesheet.match(new RegExp(`${escapedSelector}\\s*\\{(?<body>[\\s\\S]*?)\\n\\s*\\}`)); |
| 24 | return match?.groups?.body ?? ''; |
| 25 | } |
| 26 | |
| 27 | describe('NavPanel layout styles', () => { |
| 28 | it('allows navigation list wrappers to shrink instead of inheriting long item widths', () => { |
no test coverage detected