From d91ebe9acf276feef358d0f9dd9b28b11124c7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Thu, 16 Dec 2021 00:57:03 +0800 Subject: [PATCH] test: fix initial test case (#33313) * test: fix initial test case * chore: replace with exist fn * chore: rm dep conflict * chore: fix dev jest env --- components/input/__tests__/textarea.test.js | 1 + package.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/input/__tests__/textarea.test.js b/components/input/__tests__/textarea.test.js index d53ab024c1..257a62f23c 100644 --- a/components/input/__tests__/textarea.test.js +++ b/components/input/__tests__/textarea.test.js @@ -358,6 +358,7 @@ describe('TextArea allowClear', () => { 'setSelectionRange', ); wrapper.find('textarea').simulate('input', { target: { value: '\n1' } }); + wrapper.triggerResize(); await sleep(100); expect(setSelectionRangeFn).toHaveBeenCalled(); wrapper.unmount(); diff --git a/package.json b/package.json index 3c9179a471..a7dfaed297 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "rc-picker": "~2.5.17", "rc-progress": "~3.1.0", "rc-rate": "~2.9.0", - "rc-resize-observer": "^1.1.0", + "rc-resize-observer": "^1.1.2", "rc-select": "~13.2.1", "rc-slider": "~9.7.4", "rc-steps": "~4.1.0", @@ -167,7 +167,7 @@ "@types/gtag.js": "^0.0.8", "@types/jest": "^27.0.0", "@types/jest-axe": "^3.5.3", - "@types/jest-environment-puppeteer": "^4.4.0", + "@types/jest-environment-puppeteer": "^4.4.1", "@types/jest-image-snapshot": "^4.1.0", "@types/lodash": "^4.14.139", "@types/puppeteer": "^5.4.0", @@ -227,6 +227,7 @@ "isomorphic-fetch": "^3.0.0", "jest": "^27.0.3", "jest-axe": "^5.0.1", + "jest-environment-node": "^27.4.4", "jest-image-snapshot": "^4.5.1", "jest-puppeteer": "^6.0.0", "jquery": "^3.4.1",