Files
NapCatQQ/.pnpm-store/v3/files/5a/c526fc19d7068d90c5c5ffcf5ad3ea3263ffcce6822396304c968463e27fa6341dff819e1bd465706dc83c47022e15dcd1495c81e51a394d0bd685f5d993ba
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

39 lines
896 B
Plaintext

import test from 'tape';
import JSXAttributeMock from '../../../../__mocks__/JSXAttributeMock';
import getImplicitRoleForMenuitem from '../../../../src/util/implicitRoles/menuitem';
test('isAbstractRole', (t) => {
t.equal(
getImplicitRoleForMenuitem([JSXAttributeMock('type', 'command')]),
'menuitem',
'works for menu items',
);
t.equal(
getImplicitRoleForMenuitem([JSXAttributeMock('type', 'checkbox')]),
'menuitemcheckbox',
'works for menu item checkboxes',
);
t.equal(
getImplicitRoleForMenuitem([JSXAttributeMock('type', 'radio')]),
'menuitemradio',
'works for menu item radios',
);
t.equal(
getImplicitRoleForMenuitem([JSXAttributeMock('type', '')]),
'',
'works for non-toolbars',
);
t.equal(
getImplicitRoleForMenuitem([JSXAttributeMock('type', true)]),
'',
'works for the true case',
);
t.end();
});