(arr: string[])
| 2756 | |
| 2757 | test('variants with the same root are sorted deterministically', async () => { |
| 2758 | function permute(arr: string[]): string[][] { |
| 2759 | if (arr.length <= 1) return [arr] |
| 2760 | |
| 2761 | return arr.flatMap((item, i) => |
| 2762 | permute([...arr.slice(0, i), ...arr.slice(i + 1)]).map((permutation) => [ |
| 2763 | item, |
| 2764 | ...permutation, |
| 2765 | ]), |
| 2766 | ) |
| 2767 | } |
| 2768 | |
| 2769 | let classLists = permute([ |
| 2770 | 'data-hover:flex', |