code-dot-org/blockly — pull request #584 by Bjvanminnen (2014-05-15 21:19:02+00:00)
Title: Level tests

Add a few level tests to test for case where we have an infinity loop - one for an angry birds maze level, one for a plants vs. zombies maze level, and one for a farmer level.

One challenge was that the contents of expected can only be used to validate whatever is passed into BlocklyApps.report. In this case, we pass in a result equal to whether or not Maze.result is SUCCESS. I solved this by adding an optional customValidator that can be used to execute/validate any arbitrary code.