updated tests for to-array.js