Skip to content

Reproduction: settledness testing issue with async data#32

Open
NullVoxPopuli wants to merge 3 commits intotracked-tools:masterfrom
NullVoxPopuli:async-settledness-issue
Open

Reproduction: settledness testing issue with async data#32
NullVoxPopuli wants to merge 3 commits intotracked-tools:masterfrom
NullVoxPopuli:async-settledness-issue

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Mar 9, 2021

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

instance.left = 1;
await settled();

assert.equal(instance.test, 1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion fails as instance.test is 0.
I don't think it's timing related, because await this.pauseTest() doesn't change anything.

instance.right = 3;
await settled();

assert.equal(instance.test, 4);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion fails as instance.test is 1.
I don't think it's timing related, because await this.pauseTest() doesn't change anything.

instance.left = 2;
await settled();

assert.equal(instance.test, 5);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion fails as instance.test is 4.
I don't think it's timing related, because await this.pauseTest() doesn't change anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant