dillon1000/react

Commit

[tests] Fix ReactDOMAttribute-test (#35654)

In https://github.com/facebook/react/pull/35646 I thought there was a
bug in trusted types, but the bug is in jsdom.

For trusted types we still want to check the coersion and throw for a
good dev warning, but prod will also throw becuase the browser will
implicitly coerce to a string. This ensures there's no behavior
difference between dev and prod.

So the right fix is to add in the JSDOM hack that's used in
`ReactDOMSelect-test.js`.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-dom/src/__tests__/ReactDOMAttribute-test.js ModifiedM packages/shared/CheckStringCoercion.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…