test/helpers.js: fix check for array.

Another approach would be to use lodash's `isArray`. I went with `Array.isArray` since it's used one more time in the codebase, but I can change it if people prefer the lodash approach.