-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test to verify no network request on prefetched link click (#1257)
* Fix test not making a network request after prefetch click The test was supposed to assert that a network request was not made when clicking on a link that had been prefetched by hovering over it. However, the test was not actually making the click, just trying to hover over an already hovered link, so this wasn't really testing what it was supposed to. * assertRequestMade and assertRequestNotMade take functions as arguments These functions are called to perform the action that should trigger the network request. This allows us to test different scenarios without repeating the same code. It also allows us to pass a callback that will be called with the request object when the request is made. This is useful for testing the request object itself.
- Loading branch information
1 parent
cd16067
commit 8c706bb
Showing
1 changed file
with
48 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters