_create(mirageServer, config) {
    if (typeof window !== "undefined") {
      this.trackRequests = config.trackRequests || false;
      return new Pretender(
        function () {
          this.passthroughRequest = function (verb, path, request) {
            if (mirageServer.shouldLog()) {
              console.log(
                `Mirage: Passthrough request for ${verb.toUpperCase()} ${
                  request.url
                }`
              );
            }
          };

          this.handledRequest = function (verb, path, request) {
            if (mirageServer.shouldLog()) {
              console.groupCollapsed(
                `Mirage: [${request.status}] ${verb.toUpperCase()} ${
                  request.url
                }`
              );
              let { requestBody, responseText } = request;
              let loggedRequest, loggedResponse;

              try {
                loggedRequest = JSON.parse(requestBody);
              } catch (e) {
                loggedRequest = requestBody;
              }

              try {
                loggedResponse = JSON.parse(responseText);
              } catch (e) {
                loggedResponse = responseText;
              }

              console.groupCollapsed("Response");
              console.log(loggedResponse);
              console.groupEnd();

              console.groupCollapsed("Request (data)");
              console.log(loggedRequest);
              console.groupEnd();

              console.groupCollapsed("Request (raw)");
              console.log(request);
              console.groupEnd();

              console.groupEnd();
            }
          };

          let originalCheckPassthrough = this.checkPassthrough;
          this.checkPassthrough = function (request) {
            let shouldPassthrough = mirageServer.passthroughChecks.some(
              (passthroughCheck) => passthroughCheck(request)
            );

            if (shouldPassthrough) {
              let url = request.url.includes("?")
                ? request.url.substr(0, request.url.indexOf("?"))
                : request.url;

              this[request.method.toLowerCase()](url, this.passthrough);
            }

            return originalCheckPassthrough.apply(this, arguments);
          };

          this.unhandledRequest = function (verb, path) {
            path = decodeURI(path);
            let namespaceError = "";
            if (this.namespace === "") {
              namespaceError =
                "There is no existing namespace defined. Please define one";
            } else {
              namespaceError = `The existing namespace is ${this.namespace}`;
            }
            assert(
              `Your app tried to ${verb} '${path}', but there was no route defined to handle this request. Define a route for this endpoint in your routes() config. Did you forget to define a namespace? ${namespaceError}`
            );
          };
        },
        { trackRequests: this.trackRequests }
      );
    }
  }
Creates a new Pretender instance.

@method _create
@param {Server} server
@return {Object} A new Pretender instance.
@public