Introduced test/main.js and added polyfill for Array.isArray in tests