Added tests to testcases.js