Refactored and organized match.js tests