static install() {
    if (jasmine.Fetch.container_ && jasmine.Fetch.container_.installed_) {
      // jasmine.Fetch is already installed
      return;
    }

    // Set up the container.
    jasmine.Fetch.container_ = jasmine.Fetch.container_ || {};
    jasmine.Fetch.container_.installed_ = true;
    jasmine.Fetch.container_.stubbedRequests = {};
    /** @type {jasmine.Fetch.RequestStub} */
    jasmine.Fetch.container_.lastFetchRequestStub;
    jasmine.Fetch.container_.oldFetch = window.fetch;
    jasmine.Fetch.container_.oldHeaders = window.Headers;
    jasmine.Fetch.container_.oldAbortController = window.AbortController;
    jasmine.Fetch.container_.oldResponse = window.Response;
    jasmine.Fetch.container_.oldReadableStream = window.ReadableStream;
    /** @type {!Response} */
    jasmine.Fetch.container_.latestResponse;

    window.Headers =
    /**
     * @type {function (new:Headers,
     *     (!Array<!Array<string>>|Headers|Object<string,string>)=)}
     */(
        jasmine.Fetch.Headers);

    window.AbortController = /** @type {function (new:AbortController)} */
        (jasmine.Fetch.AbortController);

    window.Response = /** @type {function (new:Response)} */
        (jasmine.Fetch.Response);

    window.ReadableStream = /** @type {function (new:ReadableStream)} */
        (jasmine.Fetch.ReadableStream);

    window.fetch = (input, init) => {
      // TODO: this does not support input in Request form
      const url = /** @type {string} */ (input);
      return jasmine.Fetch.impl_(url, init || null);
    };
  }
Install a Jasmine-based mock for the fetch API.
This API is based on that of jasmine-ajax.