whole_func_string: function asCheckedCallback(promise, cb, useOwnMethod) {
    let called = false;
    if (useOwnMethod) {
      promise.asCallback(after);
    } else {
      asCallback(promise, after);
    }
  
    function after() {
      expect(called).toBeFalsy();
      called = true;
      return cb.apply(this, arguments);
    }
  }
func_code_string: function asCheckedCallback(promise, cb, useOwnMethod) {
    let called = false;
    if (useOwnMethod) {
      promise.asCallback(after);
    } else {
      asCallback(promise, after);
    }
  
    function after() {
      expect(called).toBeFalsy();
      called = true;
      return cb.apply(this, arguments);
    }
  }
func_documentation_string: Wrap the asCallback function with a check that ensures the callback is never called twice.