Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Rely less on changeId in tests #112

Merged
merged 2 commits into from
Dec 11, 2015
Merged

Conversation

kimjoar
Copy link
Collaborator

@kimjoar kimjoar commented Dec 10, 2015

Tried to clean up the tests so they have less duplication and rely less on checking changeId, but focus more on checking what actually triggers history.listen (i.e. the external api for these changes). This should make it easier to tests changes to how we stop cycles.

I removed the test named "does not unnecessarily update the store", but added a "only triggers once when updating path via store" (which I created as part of #109, where I have a test which covers history.pushState).

@jlongster
Copy link
Member

I removed the test named "does not unnecessarily update the store", but added a "only triggers once when updating path via store" (which I created as part of #109, where I have a test which covers history.pushState).

That doesn't seem to do the same thing as the test you removed. The test you removed listens for store changes, while the test you added listens for history changes.

But this looks good to me!

@kimjoar
Copy link
Collaborator Author

kimjoar commented Dec 11, 2015

Yeah, good point. I'll add another test for it.

@kimjoar
Copy link
Collaborator Author

kimjoar commented Dec 11, 2015

I added a test that covers store updates.

kimjoar added a commit that referenced this pull request Dec 11, 2015
@kimjoar kimjoar merged commit 0145d6f into reactjs:master Dec 11, 2015
@kimjoar kimjoar deleted the rely-less-on-changeid branch December 11, 2015 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants