| 1028 | }); |
| 1029 | |
| 1030 | function createTestMenu(items: SignalLike<MenuItemPattern<any>[]>) { |
| 1031 | return new MenuPattern({ |
| 1032 | id: signal('menu-1'), |
| 1033 | items, |
| 1034 | parent: signal(undefined), |
| 1035 | textDirection: signal('ltr'), |
| 1036 | expansionDelay: signal(100), |
| 1037 | disabled: signal(false), |
| 1038 | activeItem: signal(undefined), |
| 1039 | typeaheadDelay: signal(500), |
| 1040 | wrap: signal(true), |
| 1041 | softDisabled: signal(true), |
| 1042 | multi: signal(false), |
| 1043 | focusMode: signal('activedescendant'), |
| 1044 | orientation: signal('vertical'), |
| 1045 | selectionMode: signal('explicit'), |
| 1046 | element: signal(document.createElement('div')), |
| 1047 | }); |
| 1048 | } |
| 1049 | |
| 1050 | it('should not report duplicate violations for items without a value', () => { |
| 1051 | const items = signal<MenuItemPattern<any>[]>([]); |