Added some sweet in-browser tests with drawn polygons. Very useful.
Got the tests to pass in both browser and node.