From 2d5949f31dbb84df2263a836adc1e6c43f6b331d Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Wed, 11 Jul 2018 19:31:36 +0800 Subject: [PATCH] test: use render for snapshot --- .../__snapshots__/index.test.js.snap | 200 +++++------------- components/tabs/__tests__/index.test.js | 4 +- 2 files changed, 57 insertions(+), 147 deletions(-) diff --git a/components/tabs/__tests__/__snapshots__/index.test.js.snap b/components/tabs/__tests__/__snapshots__/index.test.js.snap index cbff9960bc..208252aaa0 100644 --- a/components/tabs/__tests__/__snapshots__/index.test.js.snap +++ b/components/tabs/__tests__/__snapshots__/index.test.js.snap @@ -1,164 +1,74 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Tabs tabPosition remove card 1`] = ` - -
- - xxx -
- } - inkBarAnimated={true} - key="tabBar" - onKeyDown={[Function]} - onNextClick={[Function]} - onPrevClick={[Function]} - onTabClick={[Function]} - panels={ - - foo - - } - prefixCls="ant-tabs" - scrollAnimated={true} - styles={Object {}} - tabBarPosition="left" + + + + + + +
- - - - - - -
-
-
-
-
- foo -
-
-
-
-
-
- xxx -
-
- - -
-
+ - +
-
+
-
-
+
+ xxx +
+ +
+
+ foo +
+
+ `; diff --git a/components/tabs/__tests__/index.test.js b/components/tabs/__tests__/index.test.js index b0e89b051c..e07a530f47 100644 --- a/components/tabs/__tests__/index.test.js +++ b/components/tabs/__tests__/index.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { mount } from 'enzyme'; +import { mount, render } from 'enzyme'; import Tabs from '..'; const { TabPane } = Tabs; @@ -31,7 +31,7 @@ describe('Tabs', () => { describe('tabPosition', () => { it('remove card', () => { - const wrapper = mount( + const wrapper = render( foo