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
This commit is contained in:
二货机器人 2021-12-16 00:57:03 +08:00 committed by GitHub
parent b1642233e8
commit d91ebe9acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -358,6 +358,7 @@ describe('TextArea allowClear', () => {
'setSelectionRange', 'setSelectionRange',
); );
wrapper.find('textarea').simulate('input', { target: { value: '\n1' } }); wrapper.find('textarea').simulate('input', { target: { value: '\n1' } });
wrapper.triggerResize();
await sleep(100); await sleep(100);
expect(setSelectionRangeFn).toHaveBeenCalled(); expect(setSelectionRangeFn).toHaveBeenCalled();
wrapper.unmount(); wrapper.unmount();

View File

@ -138,7 +138,7 @@
"rc-picker": "~2.5.17", "rc-picker": "~2.5.17",
"rc-progress": "~3.1.0", "rc-progress": "~3.1.0",
"rc-rate": "~2.9.0", "rc-rate": "~2.9.0",
"rc-resize-observer": "^1.1.0", "rc-resize-observer": "^1.1.2",
"rc-select": "~13.2.1", "rc-select": "~13.2.1",
"rc-slider": "~9.7.4", "rc-slider": "~9.7.4",
"rc-steps": "~4.1.0", "rc-steps": "~4.1.0",
@ -167,7 +167,7 @@
"@types/gtag.js": "^0.0.8", "@types/gtag.js": "^0.0.8",
"@types/jest": "^27.0.0", "@types/jest": "^27.0.0",
"@types/jest-axe": "^3.5.3", "@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/jest-image-snapshot": "^4.1.0",
"@types/lodash": "^4.14.139", "@types/lodash": "^4.14.139",
"@types/puppeteer": "^5.4.0", "@types/puppeteer": "^5.4.0",
@ -227,6 +227,7 @@
"isomorphic-fetch": "^3.0.0", "isomorphic-fetch": "^3.0.0",
"jest": "^27.0.3", "jest": "^27.0.3",
"jest-axe": "^5.0.1", "jest-axe": "^5.0.1",
"jest-environment-node": "^27.4.4",
"jest-image-snapshot": "^4.5.1", "jest-image-snapshot": "^4.5.1",
"jest-puppeteer": "^6.0.0", "jest-puppeteer": "^6.0.0",
"jquery": "^3.4.1", "jquery": "^3.4.1",