-
Notifications
You must be signed in to change notification settings - Fork 50.5k
Description
The most recurrent source of disagreement between test results within Facebook and those given by grunt test is that Facebook has a more consistent strategy for mocking modules that are not currently under test.
When I implemented the PhantomJS test harness for this open-source repository, for the sake of experiment and because the "right way" would have been "hard," I decided to play with fire: I discarded the assumption of auto-mocking entirely, in preference to simply fixing any tests that failed because of the lack of mocking.
Fortunately, there have not been too many test failures of that sort, partly due to another mitigating factor: we run each test suite in its own <iframe>, so information is somewhat isolated between each test unit.
Nevertheless, I think we can do a much better job of emulating the mocking behavior of the FB codebase. Discussion of plans here: #154 (comment)