code: function deleteInstance() {
    var _this = this;
  
    expect(arguments).to.have.length(
      0,
      'Invalid arguments length when deleting a "' +
      this.Entity.specification.name +
      '" instance (it has to be passed 0 arguments)');
  
    return new Promise(function (resolve, reject) {
  
      var promise = _this.adapter.deleteObject(_this);
  
      expect(promise).to.respondTo(
        'then',
        'Function "delete" of an Adapter specialization should return a Promise'
      );
  
      expect(promise).to.respondTo(
        'catch',
        'Function "delete" of an Adapter specialization should return a Promise'
      );
  
      promise
        .then(resolve)
        .catch(reject);
    });
  }
docs: deletes an entity.
  @name module:back4app-entity/models.Entity#isValid
  @function
  @param {}
  @returns {boolean} The validation result.
  @example
  myEntity.delete(); // Deletes the instance of an Entity.