Added log option for mocha tests
Added some tests for the detector object