Unit tests for dispatcher?
No test folder in the repo, but assume (some) exists somewhere.
I can port over Facebook's internal tests, I think. Let's keep this issue open until I get that done.
@fisherwebdev The tests expect the Dispatcher with waitFor taking 2nd argument:
https://github.com/facebook/flux/commit/83a9505d9814f034bc19c451e011bca0b738b273#diff-e0947f38df5ab3cb5b2137999fb1a23cR141
The Dispatcher in the repo does not match this signature, it takes a single argument: https://github.com/facebook/flux/blob/master/src/Dispatcher.js#L154
I'm not sure what those tests are trying to do. I copied these over from our internal tests, but these don't make sense. I also can't find any history in our internal code of some legacy version of the dispatcher having these second arguments. I'll ask around at FB about this, but for now I'm going to pull out those tests.
Did not pull out the tests, but rather simply fixed them to take the correct arguments. These are the tests that make sure the dispatcher throws an error if you create a circular dependency -- very important.
@fisherwebdev Thanks! didn't see this.