From 5e0c232077aa6235ad477a20f728e1a97c159754 Mon Sep 17 00:00:00 2001 From: Zack Chang <73225408+jrr997@users.noreply.github.com> Date: Thu, 24 Mar 2022 14:27:42 +0800 Subject: [PATCH] chore: update Item component test case (#34686) Co-authored-by: Zack Chang --- components/list/__tests__/Item.test.js | 4 +- .../__tests__/__snapshots__/Item.test.js.snap | 164 +++++------------- 2 files changed, 50 insertions(+), 118 deletions(-) diff --git a/components/list/__tests__/Item.test.js b/components/list/__tests__/Item.test.js index 67985ffaa3..44c5fa1052 100644 --- a/components/list/__tests__/Item.test.js +++ b/components/list/__tests__/Item.test.js @@ -151,7 +151,7 @@ describe('List Item Layout', () => { renderItem={item => {item.title}} />, ); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.render()).toMatchSnapshot(); }); it('rowKey could be function', () => { @@ -176,6 +176,6 @@ describe('List Item Layout', () => { renderItem={item => {item.title}} />, ); - expect(wrapper).toMatchSnapshot(); + expect(wrapper.render()).toMatchSnapshot(); }); }); diff --git a/components/list/__tests__/__snapshots__/Item.test.js.snap b/components/list/__tests__/__snapshots__/Item.test.js.snap index 1c4323d456..abd9b98b31 100644 --- a/components/list/__tests__/__snapshots__/Item.test.js.snap +++ b/components/list/__tests__/__snapshots__/Item.test.js.snap @@ -58,139 +58,71 @@ exports[`List Item Layout horizontal itemLayout List should accept extra node 1` `; exports[`List Item Layout rowKey could be function 1`] = ` -
- -
-
-
    - -
  • - ant design -
  • -
    - -
  • - ant design -
  • -
    - -
  • - ant design -
  • -
    -
-
-
-
+ ant design + +
  • + ant design +
  • +
  • + ant design +
  • + +
    -
    + `; exports[`List Item Layout rowKey could be string 1`] = ` -
    - -
    -
    -
      - -
    • - ant design -
    • -
      - -
    • - ant design -
    • -
      - -
    • - ant design -
    • -
      -
    -
    -
    -
    + ant design + +
  • + ant design +
  • +
  • + ant design +
  • + +
    -
    + `; exports[`List Item Layout should render in RTL direction 1`] = `