title: Error: Not implemented: HTMLFormElement.prototype.submit
body: <p>This is how my test case looks : </p>
  
  <pre><code>const renderCard = ({
    onSubmit = jest.fn(),
  }: RenderCardParams = {}) =&gt; {
    return render(
          &lt;Card title={title} onSubmit={onSubmit}&gt;
            &lt;Button type="submit"&gt;Save&lt;/Button&gt;
          &lt;/Card&gt;,
    );
  }; 
  
  it("should invoke onSubmit when form is submitted", async () =&gt; {
        const onSubmit = jest.fn();
        window.HTMLFormElement.prototype.submit = () =&gt; {};
        const { getByText } = renderCard({ onSubmit });
        const button = getByText("Save").closest("button");
        if (button) {
          fireEvent.click(button);
        }
        await wait(() =&gt; expect(onSubmit).toHaveBeenCalled());
   });
  </code></pre>
  
  <p>I am receiving "Error: Not implemented: HTMLFormElement.prototype.submit". I tried the solution mentioned here <a href="https://github.com/jsdom/jsdom/issues/1937" rel="noreferrer">https://github.com/jsdom/jsdom/issues/1937</a> , but it did not work. I do not want to silence the errors but implement the test correctly. Thank you. </p>