From 4a0b04e0631444da353bc137220efb876ebbb590 Mon Sep 17 00:00:00 2001
From: tangjinzhou <415800467@qq.com>
Date: Mon, 21 Jun 2021 14:35:44 +0800
Subject: [PATCH] test: update avatar snap
---
components/avatar/__tests__/Avatar.test.js | 4 +--
.../__snapshots__/Avatar.test.js.snap | 26 ++-----------------
2 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/components/avatar/__tests__/Avatar.test.js b/components/avatar/__tests__/Avatar.test.js
index f9537dba0..0d51a42f6 100644
--- a/components/avatar/__tests__/Avatar.test.js
+++ b/components/avatar/__tests__/Avatar.test.js
@@ -138,7 +138,7 @@ describe('Avatar Render', () => {
});
await asyncExpect(() => {
- expect(wrapper.find('.ant-avatar-string')).toMatchSnapshot();
+ expect(wrapper.find('.ant-avatar-string').html()).toMatchSnapshot();
}, 0);
Object.defineProperty(HTMLElement.prototype, 'offsetWidth', {
@@ -155,7 +155,7 @@ describe('Avatar Render', () => {
},
});
await asyncExpect(() => {
- expect(wrapper.find('.ant-avatar-string')).toMatchSnapshot();
+ expect(wrapper.find('.ant-avatar-string').html()).toMatchSnapshot();
}, 0);
});
diff --git a/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap b/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap
index df10ee4ee..168ba3baa 100644
--- a/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap
+++ b/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap
@@ -14,30 +14,8 @@ exports[`Avatar Render adjusts component size to 100 when window size is xxl 1`]
exports[`Avatar Render fallback 1`] = `
`;
-exports[`Avatar Render should calculate scale of avatar children correctly 1`] = `
-DOMWrapper {
- "wrapperElement":
-
- Avatar
-
- ,
-}
-`;
+exports[`Avatar Render should calculate scale of avatar children correctly 1`] = `Avatar`;
-exports[`Avatar Render should calculate scale of avatar children correctly 2`] = `
-DOMWrapper {
- "wrapperElement":
-
- xx
-
- ,
-}
-`;
+exports[`Avatar Render should calculate scale of avatar children correctly 2`] = `xx`;
exports[`Avatar Render should calculate scale of avatar children correctly with gap 1`] = `Avatar`;