浏览代码

Test update (#114)

* test: 1. remove useless file of unit test, which never used 2. update test/semi.html link of umd js
* docs: update semi-animation-styled readme, add link of animate.css

Co-authored-by: pointhalo <[email protected]>
pointhalo 4 年之前
父节点
当前提交
3867f9a84f
共有 3 个文件被更改,包括 3 次插入52 次删除
  1. 1 1
      packages/semi-animation-styled/README.md
  2. 2 2
      test/semi.html
  3. 0 49
      test/shared/focusTest.js

+ 1 - 1
packages/semi-animation-styled/README.md

@@ -1,6 +1,6 @@
 > Stylesheet for animation
 
-- Provides rich transition effects based on `animate.css`
+- Provides rich transition effects based on `animate.css` (https://github.com/animate-css/animate.css)
 - It is easy to use. Building rich and vivid front-end pages through adding various atomic animation style to elements
 
 ## Usage

+ 2 - 2
test/semi.html

@@ -14,8 +14,8 @@
     <script src="https://unpkg.com/[email protected]/babel.min.js"></script>
     <!-- <script src='../packages/semi-ui-react/dist/umd/semi-ui-react.js'></script>
     <link rel="stylesheet" href="../packages/semi-theme-default/css/semi.css"> -->
-    <script src='https://unpkg.byted-static.com/ies/semi-ui-react/1.3.0-alpha.3/dist/umd/semi-ui-react.min.js'></script>
-    <link rel="stylesheet" href="https://unpkg.byted-static.com/ies/semi-theme-default/1.3.0-alpha.2/css/semi.css">
+    <script src="https://unpkg.com/@douyinfe/[email protected]/dist/umd/semi-ui.min.js"></script>
+    <link rel="stylesheet" href="https://unpkg.com/@douyinfe/[email protected]/dist/css/semi.css">
 </head>
 
 <body>

+ 0 - 49
test/shared/focusTest.js

@@ -1,49 +0,0 @@
-import React from 'react';
-import { mount } from 'enzyme';
-
-export default function focusTest(Component) {
-    describe('focus and blur', () => {
-        beforeAll(() => {
-            jest.useFakeTimers();
-        });
-
-        let container;
-        beforeEach(() => {
-            container = document.createElement('div');
-            document.body.appendChild(container);
-        });
-
-        afterAll(() => {
-            jest.useRealTimers();
-        });
-
-        afterEach(() => {
-            document.body.removeChild(container);
-        });
-
-        it('focus() and onFocus', () => {
-            const handleFocus = jest.fn();
-            const wrapper = mount(<Component onFocus={handleFocus} />, { attachTo: container });
-            wrapper.instance().focus();
-            jest.runAllTimers();
-            expect(handleFocus).toHaveBeenCalled();
-        });
-
-        it('blur() and onBlur', () => {
-            const handleBlur = jest.fn();
-            const wrapper = mount(<Component onBlur={handleBlur} />, { attachTo: container });
-            wrapper.instance().focus();
-            jest.runAllTimers();
-            wrapper.instance().blur();
-            jest.runAllTimers();
-            expect(handleBlur).toHaveBeenCalled();
-        });
-
-        it('autoFocus', () => {
-            const handleFocus = jest.fn();
-            mount(<Component autoFocus onFocus={handleFocus} />, { attachTo: container });
-            jest.runAllTimers();
-            expect(handleFocus).toHaveBeenCalled();
-        });
-    });
-}