chai-http

  • Version 5.1.1
  • Published
  • 37.4 kB
  • 6 dependencies
  • MIT license

Install

npm i chai-http
yarn add chai-http
pnpm add chai-http

Overview

Extend Chai Assertion library with tests for http apis

Index

Variables

variable request

const request: Chai.ChaiHttpRequest;

    Functions

    function chaiHttp

    chaiHttp: (chai: any, utils: any) => void;

      Namespaces

      namespace global

      namespace global {}

        namespace global.Chai

        namespace global.Chai {}

          interface Assertion

          interface Assertion {}

            property headers

            headers: Assertion;

              property html

              html: Assertion;

                property json

                json: Assertion;

                  property redirect

                  redirect: Assertion;

                    property text

                    text: Assertion;

                      method charset

                      charset: (charset: string) => Assertion;

                        method cookie

                        cookie: (key: string, value?: string) => Assertion;

                          method header

                          header: (key: string, value?: string | RegExp) => Assertion;

                            method param

                            param: (key: string, value?: string) => Assertion;

                              method redirectTo

                              redirectTo: (location: string | RegExp) => Assertion;

                                method status

                                status: (code: number) => Assertion;

                                  method statusCode

                                  statusCode: (code: number) => Assertion;

                                    interface ChaiHttpRequest

                                    interface ChaiHttpRequest {}

                                      property execute

                                      execute: (app: string | any) => ChaiHttp.Agent;

                                        method agent

                                        agent: (server: any) => ChaiHttp.Agent;

                                          method Request

                                          Request: (app: string | any, method: string, path: string) => void;

                                            interface ChaiStatic

                                            interface ChaiStatic {}

                                              property request

                                              request: ChaiHttpRequest;

                                                interface TypeComparison

                                                interface TypeComparison {}

                                                  property ip

                                                  ip: Assertion;

                                                    namespace global.ChaiHttp

                                                    namespace global.ChaiHttp {}

                                                      interface Agent

                                                      interface Agent extends superAgentRequest.SuperAgentStatic {}

                                                        method close

                                                        close: (callback?: (err: any) => void) => Agent;

                                                          method keepOpen

                                                          keepOpen: () => Agent;

                                                            interface Response

                                                            interface Response extends superAgentRequest.Response {}

                                                              Package Files (1)

                                                              Dependencies (6)

                                                              Dev Dependencies (13)

                                                              Peer Dependencies (0)

                                                              No peer dependencies.

                                                              Badge

                                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/chai-http.

                                                              • Markdown
                                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/chai-http)
                                                              • HTML
                                                                <a href="https://www.jsdocs.io/package/chai-http"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>