react icon indicating copy to clipboard operation
react copied to clipboard

test:- Added a test for Form reset & case of prevent default.

Open Biki-das opened this issue 11 months ago • 3 comments

Summary

Added a test for form reset action & when e.preventDefault is done , the form inputs should not be reset to their default values. this test asserts the form reset behaviour. Just good to have i think along with the other tests.

How did you test this change?

ran yarn test packages/react-dom/src/__tests__/ReactDOMEventListener-test.js

Screenshot 2025-03-21 at 12 39 26 AM

Tests are passing.

Biki-das avatar Mar 20 '25 18:03 Biki-das

cc @gaearon @hoxyq @rickhanlonii

Biki-das avatar Mar 20 '25 18:03 Biki-das

Comparing: c0464aedb16b1c970d717651bba8d1c66c578729...045f924812d137f011cd73ea8e667d8ce049d13e

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 529.83 kB 529.83 kB = 93.51 kB 93.52 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 650.93 kB 650.93 kB = 114.65 kB 114.65 kB
facebook-www/ReactDOM-prod.classic.js = 675.87 kB 675.87 kB = 118.93 kB 118.93 kB
facebook-www/ReactDOM-prod.modern.js = 666.15 kB 666.15 kB = 117.31 kB 117.31 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by :no_entry_sign: dangerJS against 045f924812d137f011cd73ea8e667d8ce049d13e

react-sizebot avatar Mar 20 '25 18:03 react-sizebot

@gaearon can you help me get a feedback whether these tests are helpful & increase coverage

Biki-das avatar Aug 22 '25 19:08 Biki-das