it('should catch errors when creating db', function () { var attr = new Attr(), err = new DBExistsError(); attr._params = { // fake value: { name: 'mydb' } }; attr._partitioner = { // fake createAnotherDatabase: commonUtils.promiseErrorFactory(err) }; return attr._createDB(); });
return commonTestUtils.shouldThrow(function () { return attr._createDB(); }, err);