refactoring tests; uses chai instead of should