diff --git a/.changeset/slow-trees-notice.md b/.changeset/slow-trees-notice.md new file mode 100644 index 0000000000..5c235db5cb --- /dev/null +++ b/.changeset/slow-trees-notice.md @@ -0,0 +1,5 @@ +--- +"react-router-dom": patch +--- + +Streamline jsdom bug workaround in tests diff --git a/contributors.yml b/contributors.yml index 866b89355d..d8b827c9b7 100644 --- a/contributors.yml +++ b/contributors.yml @@ -74,6 +74,7 @@ - JakubDrozd - janpaepke - jasonpaulos +- jenseng - JesusTheHun - jimniels - jmargeta diff --git a/packages/react-router-dom/__tests__/data-browser-router-test.tsx b/packages/react-router-dom/__tests__/data-browser-router-test.tsx index b1c8ebace3..7148b45192 100644 --- a/packages/react-router-dom/__tests__/data-browser-router-test.tsx +++ b/packages/react-router-dom/__tests__/data-browser-router-test.tsx @@ -1506,14 +1506,7 @@ function testDomRouter( function Comp() { let location = useLocation(); return ( -
{ - // jsdom doesn't handle submitter so we add it here - // See https://github.com/jsdom/jsdom/issues/3117 - // @ts-expect-error - e.nativeEvent.submitter = e.currentTarget.querySelector("button"); - }} - > +

{location.pathname + location.search}