Added more tests to polygons.js.