소스 검색

test: 1. remove useless file of unit test, which never used 2. update test/semi.html link of umd js

pointhalo 4 년 전
부모
커밋
56c0f09f96
2개의 변경된 파일2개의 추가작업 그리고 51개의 파일을 삭제
  1. 2 2
      test/semi.html
  2. 0 49
      test/shared/focusTest.js

+ 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();
-        });
-    });
-}