Repository: remix-run/react-router
File: packages/react-router-dom/__tests__/data-browser-router-test.tsx (TypeScript)

Code before:
            "/foo"
          );
        });

        it("does not include search params when action=''", async () => {
          let router = createTestRouter(
            createRoutesFromElements(
              <Route path="/">
                <Route path="foo">
                  <Route path="*" element={<ActionEmptyComponent />} />
                </Route>
              </Route>
            ),
            {
              window: getWindow("/foo/bar?a=1#hash"),
            }
          );
          let { container } = render(<RouterProvider router={router} />);

          expect(container.querySelector("form")?.getAttribute("action")).toBe(
            "/foo"
          );
        });
      });

      it("allows uer to specify search params and hash", async () => {
        let router = createTestRouter(
          createRoutesFromElements(
            <Route path="/">
              <Route path="foo">
                <Route path="bar" element={<Form action=".?a=1#newhash" />} />
              </Route>
            </Route>
          ),
          { window: getWindow("/foo/bar?a=1#hash") }
        );
        let { container } = render(<RouterProvider router={router} />);

        expect(container.querySelector("form")?.getAttribute("action")).toBe(
          "/foo/bar?a=1#newhash"
        );
      });
    });

    describe('<Form action relative="path">', () => {
      it("navigates relative to the URL for static routes", async () => {
        let router = createTestRouter(
          createRoutesFromElements(
            <Route path="inbox">
              <Route path="messages" />
              <Route

Review comment (suggestion):
```suggestion
      it("allows user to specify search params and hash", async () => {
```

Code after:
            "/foo"
          );
        });

        it("does not include search params when action=''", async () => {
          let router = createTestRouter(
            createRoutesFromElements(
              <Route path="/">
                <Route path="foo">
                  <Route path="*" element={<ActionEmptyComponent />} />
                </Route>
              </Route>
            ),
            {
              window: getWindow("/foo/bar?a=1#hash"),
            }
          );
          let { container } = render(<RouterProvider router={router} />);

          expect(container.querySelector("form")?.getAttribute("action")).toBe(
            "/foo"
          );
        });
      });

      it("allows user to specify search params and hash", async () => {
        let router = createTestRouter(
          createRoutesFromElements(
            <Route path="/">
              <Route path="foo">
                <Route path="bar" element={<Form action=".?a=1#newhash" />} />
              </Route>
            </Route>
          ),
          { window: getWindow("/foo/bar?a=1#hash") }
        );
        let { container } = render(<RouterProvider router={router} />);

        expect(container.querySelector("form")?.getAttribute("action")).toBe(
          "/foo/bar?a=1#newhash"
        );
      });
    });

    describe('<Form action relative="path">', () => {
      it("navigates relative to the URL for static routes", async () => {
        let router = createTestRouter(
          createRoutesFromElements(
            <Route path="inbox">
              <Route path="messages" />
              <Route