Fixed parser test runner

Your test script alwais runs the last test in queryPairs. By wrapping the test function in a closure we can fix this issue. Now the problem is that 2 tests fail