Commit Graph

2 Commits

Author SHA1 Message Date
Ryan Ahearn
bb2d57b27b Update tests to use most recent jest and supporting libraries 2022-10-27 11:12:39 -04:00
Tom Byers
3c1576dacf Add helper for mocking/stubbing form.submit
JSDOM doesn't implement the submit method on form
elements. It does have a submit method but this
just fires a 'not implemented' error.

We need to spy on form submissions fired by
clicking on the submit button but can't because
this event calls the submit method internally so
spying on `form.submit` doesn't work.

This adds a helper which spies on the internal
method that is actually called. When JSDOM
implements the submit method properly this should
be removed.
2019-09-05 10:52:13 +01:00