added test/test.helper.js due to mocha problem in IE (out of stack space, issue 502). Fixed simulator to cope with IE