Browse Source

Package.json file edited

Guzel738 4 years ago
parent
commit
1940ff8065

+ 1 - 1
kafka-ui-react-app/package.json

@@ -25,7 +25,6 @@
     "redux": "^4.0.5",
     "redux": "^4.0.5",
     "redux-thunk": "^2.3.0",
     "redux-thunk": "^2.3.0",
     "reselect": "^4.0.0",
     "reselect": "^4.0.0",
-    "ts-jest": "^26.4.4",
     "typesafe-actions": "^5.1.0",
     "typesafe-actions": "^5.1.0",
     "use-debounce": "^3.4.3",
     "use-debounce": "^3.4.3",
     "uuid": "^8.3.1"
     "uuid": "^8.3.1"
@@ -100,6 +99,7 @@
     "node-sass": "^4.14.1",
     "node-sass": "^4.14.1",
     "prettier": "^2.2.1",
     "prettier": "^2.2.1",
     "react-scripts": "4.0.1",
     "react-scripts": "4.0.1",
+    "ts-jest": "^26.4.4",
     "typescript": "~4.1.2"
     "typescript": "~4.1.2"
   },
   },
   "engines": {
   "engines": {

+ 3 - 5
kafka-ui-react-app/src/tests/Topics/Details/Messages/Messages.spec.tsx

@@ -92,7 +92,7 @@ describe('Messages component', () => {
     });
     });
 
 
     describe('With defined offset value', () => {
     describe('With defined offset value', () => {
-      const wrapper = mount(setupWrapper());
+      const wrapper = shallow(setupWrapper());
 
 
       it('shows offset value in input', () => {
       it('shows offset value in input', () => {
         const offset = '10';
         const offset = '10';
@@ -107,14 +107,12 @@ describe('Messages component', () => {
       });
       });
     });
     });
     describe('With invalid offset value', () => {
     describe('With invalid offset value', () => {
-      const wrapper = mount(setupWrapper());
+      const wrapper = shallow(setupWrapper());
 
 
       it('shows 0 in input', () => {
       it('shows 0 in input', () => {
-        const offset = null;
-
         wrapper
         wrapper
           .find('#searchOffset')
           .find('#searchOffset')
-          .simulate('change', { target: { value: offset } });
+          .simulate('change', { target: { value: null } });
 
 
         expect(wrapper.find('#searchOffset').first().props().value).toBe('0');
         expect(wrapper.find('#searchOffset').first().props().value).toBe('0');
       });
       });