adding tests for JSErrorCollector