Reproduction: settledness testing issue with async data#32
Open
NullVoxPopuli wants to merge 3 commits intotracked-tools:masterfrom
Open
Reproduction: settledness testing issue with async data#32NullVoxPopuli wants to merge 3 commits intotracked-tools:masterfrom
NullVoxPopuli wants to merge 3 commits intotracked-tools:masterfrom
Conversation
NullVoxPopuli
commented
Mar 9, 2021
tests/integration/use-test.js
Outdated
| instance.left = 1; | ||
| await settled(); | ||
|
|
||
| assert.equal(instance.test, 1); |
Contributor
Author
There was a problem hiding this comment.
This assertion fails as instance.test is 0.
I don't think it's timing related, because await this.pauseTest() doesn't change anything.
NullVoxPopuli
commented
Mar 9, 2021
| instance.right = 3; | ||
| await settled(); | ||
|
|
||
| assert.equal(instance.test, 4); |
Contributor
Author
There was a problem hiding this comment.
This assertion fails as instance.test is 1.
I don't think it's timing related, because await this.pauseTest() doesn't change anything.
NullVoxPopuli
commented
Mar 9, 2021
| instance.left = 2; | ||
| await settled(); | ||
|
|
||
| assert.equal(instance.test, 5); |
Contributor
Author
There was a problem hiding this comment.
This assertion fails as instance.test is 4.
I don't think it's timing related, because await this.pauseTest() doesn't change anything.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I'd expect the test I added to pass, but it currently, the last 3 assertions fail, but seem to be "off by one", like, the last assertion's actual value is the expected value of the previous assertion
Update:
turns out, the Resource must be re-consumed after each update to tracked properties