This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(form): fix broken preventDefault test
the original test relied on incorrect assumptions about how jasmine async tests work (when setTimeout is triggered) and how browser reloads a page (the sequence of events) and thus the test passes even when the default is not prevented. this change fixes the test by registering an extra submit event handler that checks if the default was prevented. if the default was not prevented, the test will fail and the page will be reloaded causing the test runner to panic.
- Loading branch information