Add mocha/chai tests for algorithms