You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial test failure seemed unrelated. I attempted to track it down and I found lot's of flaky tests. After a hundred bun test --randomize iterations I think I've managed to fix everything. Should I open a separate PR?
I use useSearchParams hook to manage some state in the search string. Given /path?search=hello. When user clears the search input, I skip appending the search param because it looks dumb (/path?search=), so I just do a prev.delete("search") within the setter. However, the resulting URL will be /path? (I would expect /path) because the question mark remains there unconditionally.
In the added test, I set no search params and it would be https://wouter.dev/? without the modifications.
Regarding the tests, I saw symptoms of missing unmounts (e.g. multiple links/elements found), missing act warnings, and the most tricky was that a history.back() from a previous test could affect a later history.pushState+history.length check.
No, sorry. The most tricky was that bun test --seed (IIRC) is affected by file modification timestamp/inode number/directory listing order (???). So even though I had the seed number from --randomize or without randomization I just had a failing test, I saved the test file and the failure magically disappeared on the next run and I could get a completely new, unrelated error. It kept me a while until I realized it.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.