From 9e3b6978d0c3a33918a349d2b5784929e518e7b3 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Thu, 17 Aug 2023 20:21:24 +0800 Subject: [PATCH] chore: update test --- components/descriptions/__tests__/index.test.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/components/descriptions/__tests__/index.test.tsx b/components/descriptions/__tests__/index.test.tsx index 40beed504ac1..54669dbe6523 100644 --- a/components/descriptions/__tests__/index.test.tsx +++ b/components/descriptions/__tests__/index.test.tsx @@ -323,13 +323,17 @@ describe('Descriptions', () => { it('Should Descriptions not throw react key prop error in jsx mode', () => { render( - - Test key prop + + + Zhou Maomao + + 1810000000 , ); - // expect(errorSpy).not.toHaveBeenCalledWith( - // 'Warning: DescriptionsItem: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)', - // ); - expect(errorSpy).not.toHaveBeenCalled(); + expect(errorSpy).not.toHaveBeenCalledWith( + expect.stringContaining('`key` is not a prop'), + expect.anything(), + expect.anything(), + ); }); });