code: function deleteObject(entityObject) {
    var mongoAdapter = this;
  
    expect(arguments).to.have.length(
      1,
      'Invalid arguments length when deleting an object in MongoAdapter ' +
      '(it has to be passed 1 argument)'
    );
  
    return new Promise(function (resolve, reject) {
      expect(entityObject).to.be.an.instanceOf(
        Entity,
        'Invalid argument "entityObject" when deleting an object in a ' +
        'MongoAdapter (it has to be an Entity instance)'
      );
  
      var EntityClass = entityObject.Entity;
  
      return mongoAdapter
        .getDatabase()
        .then(function (database) {
          return database
            .collection(getEntityCollectionName(EntityClass))
            .findOneAndDelete({_id: entityObject.id});
        })
        .then(function (result) {
          expect(result.ok).to.equal(
            1,
            'Invalid result.ok return of collection.findOneAndDelete ' +
            'in MongoDB driver when deleting an Object (it should be 1)'
          );
  
          resolve();
        })
        .catch(reject);
    });
  }
docs: Delete object in the database matching given id.
  @name module:back4app-entity-mongodb.MongoAdapter#deleteObject
  @function
  @returns {Promise.<undefined|Error>} Promise that resolves if argument
  is valid or throws error message if not valid.
  @example
  var promise = mongoAdapter.deleteObject(car);
  promise
  .then(resolve)
  .catch(reject);