code-dot-org/blockly — pull request #443 by Bjvanminnen (2014-03-14 20:55:51+00:00)
Title: Unit testing for blockly

A bunch of stuff going on here.
- A couple minor changes to non-test code that are generally just cleanup. These could go into a separate commit if that would be preferred for more clarity.
- A module 'overloader' that allows you to call require() with a set of path mappings. This allows us to require some of our code in the src tree and still get nested calls to require right.
- A module 'globalDiff' that allows you to track additions to the global namespace. This can be useful for validating assumptions about whether or not a particular module will pollute the global namespace.
- Frame.js (not sure I like the name), which provides at basic dom with blockly core imported. Long-term it would be great if we could have blockly-core be more modular, such that we could pick and choose pieces that we need, but I'm not sure how trivial this would be.
- Some code in feedback.js that exports an otherwise private function. This code gets stripped by grunt as part of the build, such that it will remain private outside of test scenarios.
- A bunch of unit tests for getMissingRequiredBlocks that attempt to be as app independent as possible.