refactored Mocha DB test