From d099dea28b85db0fb0fc28f18f04c31f8b67a83c Mon Sep 17 00:00:00 2001 From: MasaoBlue <16271994+MasaoBlue@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:25:49 +0900 Subject: [PATCH] fix: menu items typings (#35790) * Fix menu items typings * add test case for menu item type checking --- .../__snapshots__/index.test.js.snap | 161 ++++++++++++++++++ components/menu/__tests__/index.test.js | 42 +++++ components/menu/__tests__/type.test.tsx | 40 +++++ components/menu/hooks/useItems.tsx | 2 +- 4 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 components/menu/__tests__/type.test.tsx diff --git a/components/menu/__tests__/__snapshots__/index.test.js.snap b/components/menu/__tests__/__snapshots__/index.test.js.snap index 724f5ab99f..8f2d757367 100644 --- a/components/menu/__tests__/__snapshots__/index.test.js.snap +++ b/components/menu/__tests__/__snapshots__/index.test.js.snap @@ -162,6 +162,167 @@ Array [ ] `; +exports[`Menu all types must be available in the "items" syntax 1`] = ` +Array [ +
, + , +] +`; + exports[`Menu rtl render component should be rendered correctly in RTL direction 1`] = ` Array [