Rewrite unit tests

Restructure tests, use BDD interface, replace assert with chai.expect