@loopback/docs
Version:
Documentation for LoopBack 4
1,555 lines (1,554 loc) • 100 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.6.2",
"schemaVersion": 1003,
"oldestForwardsCompatibleVersion": 1001
},
"kind": "Package",
"canonicalReference": "@loopback/testlab!",
"docComment": "",
"name": "@loopback/testlab",
"members": [
{
"kind": "EntryPoint",
"canonicalReference": "@loopback/testlab!",
"name": "",
"members": [
{
"kind": "TypeAlias",
"canonicalReference": "@loopback/testlab!Client:type",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type Client = "
},
{
"kind": "Reference",
"text": "supertest.SuperTest",
"canonicalReference": "@types/supertest!~supertest.SuperTest:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "supertest.Test",
"canonicalReference": "@types/supertest!~supertest.Test:interface"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "Client",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 5
}
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!createClientForHandler:function(1)",
"docComment": "/**\n * Create a SuperTest client connected to an HTTP server listening on an ephemeral port and calling `handler` to handle incoming requests.\n *\n * @param - handler\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function createClientForHandler(handler: "
},
{
"kind": "Content",
"text": "(req: "
},
{
"kind": "Reference",
"text": "http.IncomingMessage",
"canonicalReference": "!\"\\\"http\\\"\".IncomingMessage:class"
},
{
"kind": "Content",
"text": ", res: "
},
{
"kind": "Reference",
"text": "http.ServerResponse",
"canonicalReference": "!\"\\\"http\\\"\".ServerResponse:class"
},
{
"kind": "Content",
"text": ") => void"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Client",
"canonicalReference": "@loopback/testlab!Client:type"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 8
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "handler",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 6
}
}
],
"name": "createClientForHandler"
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!createRestAppClient:function(1)",
"docComment": "/**\n * Create a SuperTest client for a running RestApplication instance. It is the responsibility of the caller to ensure that the app is running and to stop the application after all tests are done.\n *\n * @param app - A running (listening) instance of a RestApplication.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function createRestAppClient(app: "
},
{
"kind": "Reference",
"text": "RestApplicationLike",
"canonicalReference": "@loopback/testlab!RestApplicationLike:interface"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "supertest.SuperTest",
"canonicalReference": "@types/supertest!~supertest.SuperTest:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "supertest.Test",
"canonicalReference": "@types/supertest!~supertest.Test:interface"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "app",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "createRestAppClient"
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!createStubInstance:function(1)",
"docComment": "/**\n * Creates a new object with the given functions as the prototype and stubs all implemented functions.\n *\n * Note: The given constructor function is not invoked. See also the stub API.\n *\n * This is a helper method replacing `sinon.createStubInstance` and working around the limitations of TypeScript and Sinon, where Sinon is not able to list private/protected members in the type definition of the stub instance and therefore the stub instance cannot be assigned to places expecting TType. See also - https://github.com/Microsoft/TypeScript/issues/13543 - https://github.com/DefinitelyTyped/DefinitelyTyped/issues/14811\n *\n * @param constructor - Object or class to stub.\n *\n * @typeParam TType - Type being stubbed.\n *\n * @returns A stubbed version of the constructor, with an extra property `stubs` providing access to stub API for individual methods.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function createStubInstance<TType>(constructor: "
},
{
"kind": "Reference",
"text": "sinon.StubbableType",
"canonicalReference": "@types/sinon!~Sinon.StubbableType:type"
},
{
"kind": "Content",
"text": "<TType>"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "StubbedInstanceWithSinonAccessor",
"canonicalReference": "@loopback/testlab!StubbedInstanceWithSinonAccessor:type"
},
{
"kind": "Content",
"text": "<TType>"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 4,
"endIndex": 6
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "constructor",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
}
],
"typeParameters": [
{
"typeParameterName": "TType",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "createStubInstance"
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!createUnexpectedHttpErrorLogger:function(1)",
"docComment": "/**\n * Creates a Logger that logs an Error if the HTTP status code is not expected\n *\n * @param expectedStatusCode - HTTP status code that is expected\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function createUnexpectedHttpErrorLogger(expectedStatusCode?: "
},
{
"kind": "Content",
"text": "number"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "LogError",
"canonicalReference": "@loopback/testlab!~LogError:type"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "expectedStatusCode",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "createUnexpectedHttpErrorLogger"
},
{
"kind": "Variable",
"canonicalReference": "@loopback/testlab!expect:var",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "expect: "
},
{
"kind": "Reference",
"text": "Internal",
"canonicalReference": "!Internal:interface"
}
],
"releaseTag": "Public",
"name": "expect",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "Interface",
"canonicalReference": "@loopback/testlab!ExpressContextStub:interface",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface ExpressContextStub extends "
},
{
"kind": "Reference",
"text": "HandlerContextStub",
"canonicalReference": "@loopback/testlab!HandlerContextStub:interface"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "ExpressContextStub",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!ExpressContextStub#app:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "app: "
},
{
"kind": "Reference",
"text": "express.Application",
"canonicalReference": "@types/express!~e.Application:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "app",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!ExpressContextStub#request:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "request: "
},
{
"kind": "Reference",
"text": "express.Request",
"canonicalReference": "@types/express!~e.Request:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "request",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!ExpressContextStub#response:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "response: "
},
{
"kind": "Reference",
"text": "express.Response",
"canonicalReference": "@types/express!~e.Response:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "response",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!ExpressContextStub#result:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "result: "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "ObservedResponse",
"canonicalReference": "@loopback/testlab!ObservedResponse:type"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "result",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 5
}
}
],
"extendsTokenRanges": [
{
"startIndex": 1,
"endIndex": 3
}
]
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!givenHttpServerConfig:function(1)",
"docComment": "/**\n * Create an HTTP-server configuration that works well in test environments. - Ask the operating system to assign a free (ephemeral) port. - Use IPv4 localhost `127.0.0.1` to avoid known IPv6 issues in Docker-based environments like Travis-CI. - Provide default TLS key & cert when `protocol` is set to `https`.\n *\n * @param customConfig - Additional configuration options to apply.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function givenHttpServerConfig<T extends "
},
{
"kind": "Reference",
"text": "HttpOptions",
"canonicalReference": "@loopback/testlab!HttpOptions:interface"
},
{
"kind": "Content",
"text": " | "
},
{
"kind": "Reference",
"text": "HttpsOptions",
"canonicalReference": "@loopback/testlab!HttpsOptions:interface"
},
{
"kind": "Content",
"text": ">(customConfig?: "
},
{
"kind": "Content",
"text": "T"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "HostPort",
"canonicalReference": "@loopback/testlab!HostPort:type"
},
{
"kind": "Content",
"text": " & T"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 7,
"endIndex": 9
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "customConfig",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
}
}
],
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 4
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "givenHttpServerConfig"
},
{
"kind": "Interface",
"canonicalReference": "@loopback/testlab!HandlerContextStub:interface",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface HandlerContextStub "
}
],
"releaseTag": "Public",
"name": "HandlerContextStub",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!HandlerContextStub#request:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "request: "
},
{
"kind": "Reference",
"text": "IncomingMessage",
"canonicalReference": "!\"\\\"http\\\"\".IncomingMessage:class"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "request",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!HandlerContextStub#response:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "response: "
},
{
"kind": "Reference",
"text": "ServerResponse",
"canonicalReference": "!\"\\\"http\\\"\".ServerResponse:class"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "response",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!HandlerContextStub#result:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "result: "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "ObservedResponse",
"canonicalReference": "@loopback/testlab!ObservedResponse:type"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "result",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 5
}
}
],
"extendsTokenRanges": []
},
{
"kind": "TypeAlias",
"canonicalReference": "@loopback/testlab!HostPort:type",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type HostPort = "
},
{
"kind": "Content",
"text": "{\n host: string;\n port: number;\n}"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "HostPort",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!httpGetAsync:function(1)",
"docComment": "/**\n * Async wrapper for making HTTP GET requests\n *\n * @param - urlString\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function httpGetAsync(urlString: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "IncomingMessage",
"canonicalReference": "!\"\\\"http\\\"\".IncomingMessage:class"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "urlString",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "httpGetAsync"
},
{
"kind": "Interface",
"canonicalReference": "@loopback/testlab!HttpOptions:interface",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface HttpOptions extends "
},
{
"kind": "Reference",
"text": "ListenOptions",
"canonicalReference": "!\"\\\"net\\\"\".ListenOptions:interface"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "HttpOptions",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!HttpOptions#protocol:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "protocol?: "
},
{
"kind": "Content",
"text": "'http'"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "protocol",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": [
{
"startIndex": 1,
"endIndex": 3
}
]
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!httpsGetAsync:function(1)",
"docComment": "/**\n * Async wrapper for making HTTPS GET requests\n *\n * @param - urlString\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function httpsGetAsync(urlString: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "IncomingMessage",
"canonicalReference": "!\"\\\"http\\\"\".IncomingMessage:class"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 3,
"endIndex": 7
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "urlString",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"name": "httpsGetAsync"
},
{
"kind": "Interface",
"canonicalReference": "@loopback/testlab!HttpsOptions:interface",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface HttpsOptions extends "
},
{
"kind": "Reference",
"text": "ListenOptions",
"canonicalReference": "!\"\\\"net\\\"\".ListenOptions:interface"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "HttpsServerOptions",
"canonicalReference": "!\"\\\"https\\\"\".ServerOptions:type"
},
{
"kind": "Content",
"text": " "
}
],
"releaseTag": "Public",
"name": "HttpsOptions",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!HttpsOptions#protocol:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "protocol: "
},
{
"kind": "Content",
"text": "'https'"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "protocol",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": [
{
"startIndex": 1,
"endIndex": 2
},
{
"startIndex": 3,
"endIndex": 5
}
]
},
{
"kind": "Variable",
"canonicalReference": "@loopback/testlab!inject:var",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "inject: "
},
{
"kind": "Content",
"text": "(dispatchFunc: "
},
{
"kind": "Reference",
"text": "ShotListener",
"canonicalReference": "@types/shot!Listener:type"
},
{
"kind": "Content",
"text": ", options: "
},
{
"kind": "Reference",
"text": "ShotRequestOptions",
"canonicalReference": "@types/shot!RequestOptions:interface"
},
{
"kind": "Content",
"text": ") => "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "ResponseObject",
"canonicalReference": "@types/shot!ResponseObject:interface"
},
{
"kind": "Content",
"text": ">"
}
],
"releaseTag": "Public",
"name": "inject",
"variableTypeTokenRange": {
"startIndex": 1,
"endIndex": 10
}
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!itSkippedOnTravis:function(1)",
"docComment": "/**\n * Helper function for skipping tests on Travis env - legacy variant supporting `it` only.\n *\n * @deprecated\n *\n * Use `skipOnTravis(it, name, fn)` instead.\n *\n * @param expectation - The test name (the first argument of `it` function).\n *\n * @param callback - The test function (the second argument of `it` function).\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function itSkippedOnTravis(expectation: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", callback?: "
},
{
"kind": "Reference",
"text": "TestFn",
"canonicalReference": "@loopback/testlab!TestFn:interface"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "void"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 5,
"endIndex": 6
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "expectation",
"parameterTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"parameterName": "callback",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
],
"name": "itSkippedOnTravis"
},
{
"kind": "TypeAlias",
"canonicalReference": "@loopback/testlab!ObservedResponse:type",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type ObservedResponse = "
},
{
"kind": "Reference",
"text": "ResponseObject",
"canonicalReference": "@types/shot!ResponseObject:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "ObservedResponse",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "Interface",
"canonicalReference": "@loopback/testlab!RestApplicationLike:interface",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface RestApplicationLike "
}
],
"releaseTag": "Public",
"name": "RestApplicationLike",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!RestApplicationLike#restServer:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "restServer: "
},
{
"kind": "Reference",
"text": "RestServerLike",
"canonicalReference": "@loopback/testlab!RestServerLike:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "restServer",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "@loopback/testlab!RestServerLike:interface",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface RestServerLike "
}
],
"releaseTag": "Public",
"name": "RestServerLike",
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!RestServerLike#rootUrl:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "rootUrl?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "rootUrl",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "@loopback/testlab!RestServerLike#url:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "url?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "url",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": []
},
{
"kind": "TypeAlias",
"canonicalReference": "@loopback/testlab!ShotCallback:type",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type ShotCallback = "
},
{
"kind": "Content",
"text": "(response: "
},
{
"kind": "Reference",
"text": "ResponseObject",
"canonicalReference": "@types/shot!ResponseObject:interface"
},
{
"kind": "Content",
"text": ") => void"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "ShotCallback",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 4
}
},
{
"kind": "TypeAlias",
"canonicalReference": "@loopback/testlab!ShotResponseCtor:type",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type ShotResponseCtor = "
},
{
"kind": "Content",
"text": "new (request: "
},
{
"kind": "Reference",
"text": "IncomingMessage",
"canonicalReference": "!\"\\\"http\\\"\".IncomingMessage:class"
},
{
"kind": "Content",
"text": ", onEnd: "
},
{
"kind": "Reference",
"text": "ShotCallback",
"canonicalReference": "@loopback/testlab!ShotCallback:type"
},
{
"kind": "Content",
"text": ") => "
},
{
"kind": "Reference",
"text": "ServerResponse",
"canonicalReference": "!\"\\\"http\\\"\".ServerResponse:class"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "ShotResponseCtor",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 7
}
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!skipIf:function(1)",
"docComment": "/**\n * Helper function for skipping tests when a certain condition is met.\n *\n * @param skip - Should the test case/suite be skipped?\n *\n * @param verb - The function to invoke to define the test case or the test suite, e.g. `it` or `describe`.\n *\n * @param name - The test name (the first argument of `verb` function).\n *\n * @param args - Additional arguments (framework specific), typically a function implementing the test.\n *\n * @example\n * ```ts\n * skipIf(\n * !features.freeFormProperties,\n * describe,\n * 'free-form properties (strict: false)',\n * () => {\n * // the tests\n * }\n * );\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function skipIf<ARGS extends "
},
{
"kind": "Content",
"text": "unknown[]"
},
{
"kind": "Content",
"text": ", RETVAL>(skip: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ", verb: "
},
{
"kind": "Reference",
"text": "TestDefinition",
"canonicalReference": "@loopback/testlab!TestDefinition:type"
},
{
"kind": "Content",
"text": "<ARGS, RETVAL> & {\n skip: "
},
{
"kind": "Reference",
"text": "TestDefinition",
"canonicalReference": "@loopback/testlab!TestDefinition:type"
},
{
"kind": "Content",
"text": "<ARGS, RETVAL>;\n}"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", ...args: "
},
{
"kind": "Content",
"text": "ARGS"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "RETVAL"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 14,
"endIndex": 15
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "skip",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
},
{
"parameterName": "verb",
"parameterTypeTokenRange": {
"startIndex": 5,
"endIndex": 9
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 10,
"endIndex": 11
}
},
{
"parameterName": "args",
"parameterTypeTokenRange": {
"startIndex": 12,
"endIndex": 13
}
}
],
"typeParameters": [
{
"typeParameterName": "ARGS",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
},
{
"typeParameterName": "RETVAL",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "skipIf"
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!skipOnTravis:function(1)",
"docComment": "/**\n * Helper function for skipping tests on Travis CI.\n *\n * @param verb - The function to invoke to define the test case or the test suite, e.g. `it` or `describe`.\n *\n * @param name - The test name (the first argument of `verb` function).\n *\n * @param args - Additional arguments (framework specific), typically a function implementing the test.\n *\n * @example\n * ```ts\n * skipOnTravis(it, 'does something when some condition', async () => {\n * // the test\n * });\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function skipOnTravis<ARGS extends "
},
{
"kind": "Content",
"text": "unknown[]"
},
{
"kind": "Content",
"text": ", RETVAL>(verb: "
},
{
"kind": "Reference",
"text": "TestDefinition",
"canonicalReference": "@loopback/testlab!TestDefinition:type"
},
{
"kind": "Content",
"text": "<ARGS, RETVAL> & {\n skip: "
},
{
"kind": "Reference",
"text": "TestDefinition",
"canonicalReference": "@loopback/testlab!TestDefinition:type"
},
{
"kind": "Content",
"text": "<ARGS, RETVAL>;\n}"
},
{
"kind": "Content",
"text": ", name: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ", ...args: "
},
{
"kind": "Content",
"text": "ARGS"
},
{
"kind": "Content",
"text": "): "
},
{
"kind": "Content",
"text": "RETVAL"
},
{
"kind": "Content",
"text": ";"
}
],
"returnTypeTokenRange": {
"startIndex": 12,
"endIndex": 13
},
"releaseTag": "Public",
"overloadIndex": 1,
"parameters": [
{
"parameterName": "verb",
"parameterTypeTokenRange": {
"startIndex": 3,
"endIndex": 7
}
},
{
"parameterName": "name",
"parameterTypeTokenRange": {
"startIndex": 8,
"endIndex": 9
}
},
{
"parameterName": "args",
"parameterTypeTokenRange": {
"startIndex": 10,
"endIndex": 11
}
}
],
"typeParameters": [
{
"typeParameterName": "ARGS",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
},
{
"typeParameterName": "RETVAL",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"name": "skipOnTravis"
},
{
"kind": "TypeAlias",
"canonicalReference": "@loopback/testlab!StubbedInstanceWithSinonAccessor:type",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare type StubbedInstanceWithSinonAccessor<T> = "
},
{
"kind": "Content",
"text": "T & {\n stubs: "
},
{
"kind": "Reference",
"text": "sinon.SinonStubbedInstance",
"canonicalReference": "@types/sinon!~Sinon.SinonStubbedInstance:type"
},
{
"kind": "Content",
"text": "<T>;\n}"
},
{
"kind": "Content",
"text": ";"
}
],
"releaseTag": "Public",
"name": "StubbedInstanceWithSinonAccessor",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"typeTokenRange": {
"startIndex": 1,
"endIndex": 4
}
},
{
"kind": "Function",
"canonicalReference": "@loopback/testlab!stubExpressContext:function(1)",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "export declare function stubExpressContext(requestOptions?: "
},
{
"kind": "Reference",
"text": "ShotRequestOptions",
"canonicalReference": "@types/shot!RequestOptions:interface"
},
{
"kind": "Content",
"text": "): "
},
{