Example #1
0
  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();
  });
Example #2
0
 return commonTestUtils.shouldThrow(function () {
   return attr._createDB();
 }, err);