-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Reset atoms when param is removed from URL when queryParams
with param
is specified
#1976
fix: Reset atoms when param is removed from URL when queryParams
with param
is specified
#1976
Conversation
- when `queryParams` with `param` is specified, and there is no parameter in the URL
@AkifumiSato - That mock URL serialization doesn't need to necessarily be used by all tests or can be extended. There is also a browser interface abstraction that may be useful for testing as well. |
@drarmstr Yes, I tried to write a test without mock, but it did not work. This is what I found when I tried this test case.
For these reasons, I gave up implementing this tests. |
@drarmstr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
I think that's just because actions like
|
queryParams
with param
is specifiedqueryParams
with param
is specified
This is strange. Why does this PR has no CI results? |
Because it was an external submission which I then extended with tests and test fixes in www, but because it originated with the external PR I can't export those edits back out to the PR again to run the CI. Seems like a limitation in our syncing mechanism. |
…ied (#1976) Summary: ## sumary resolve: facebookexperimental/Recoil#1900 If `queryParams` and `param` are specified and there are no parameters in the URL, the update process may not be performed. The reason is that null is assigned [here](https://github.com/facebookexperimental/Recoil/blob/0.7.5/packages/recoil-sync/RecoilSync_URL.js#L75), and [the branch](https://github.com/facebookexperimental/Recoil/blob/0.7.5/packages/recoil-sync/RecoilSync_URL.js#L248-L250) is not passed. ## note I was going to write a test, but the current test relies on [RecoilSync_MockURLSerialization.js](https://github.com/facebookexperimental/Recoil/blob/0.7.5/packages/recoil-sync/__test_utils__/RecoilSync_MockURLSerialization.js#L92), so it is difficult to write a reproducible test for this bug. Pull Request resolved: facebookexperimental/Recoil#1976 Reviewed By: butlersrepos Differential Revision: D38922526 Pulled By: drarmstr fbshipit-source-id: 40908fc2cc035790fe7750f13a5f8e2e26ef8b76
…ied (#1976) Summary: ## sumary resolve: facebookexperimental/Recoil#1900 If `queryParams` and `param` are specified and there are no parameters in the URL, the update process may not be performed. The reason is that null is assigned [here](https://github.com/facebookexperimental/Recoil/blob/0.7.5/packages/recoil-sync/RecoilSync_URL.js#L75), and [the branch](https://github.com/facebookexperimental/Recoil/blob/0.7.5/packages/recoil-sync/RecoilSync_URL.js#L248-L250) is not passed. ## note I was going to write a test, but the current test relies on [RecoilSync_MockURLSerialization.js](https://github.com/facebookexperimental/Recoil/blob/0.7.5/packages/recoil-sync/__test_utils__/RecoilSync_MockURLSerialization.js#L92), so it is difficult to write a reproducible test for this bug. Pull Request resolved: facebookexperimental/Recoil#1976 Reviewed By: butlersrepos Differential Revision: D38922526 Pulled By: drarmstr fbshipit-source-id: 40908fc2cc035790fe7750f13a5f8e2e26ef8b76
sumary
resolve: #1900
If
queryParams
andparam
are specified and there are no parameters in the URL, the update process may not be performed.The reason is that null is assigned here, and the branch is not passed.
note
I was going to write a test, but the current test relies on RecoilSync_MockURLSerialization.js, so it is difficult to write a reproducible test for this bug.