mocha test case for array checking