superwstest
Advanced tools
Comparing version 1.6.2 to 1.6.3
@@ -35,8 +35,8 @@ declare module 'superwstest' { | ||
conversion: (received: ReceivedMessage) => T, | ||
test: (message: T) => (boolean | undefined), | ||
test: (message: T) => (boolean | void), | ||
): this; | ||
expectText(expected?: string | RegExp | ((message: string) => (boolean | undefined))): this; | ||
expectJson(expected?: JsonValue | ((message: any) => (boolean | undefined))): this; | ||
expectBinary(expected?: Uint8Array | Buffer | ArrayBuffer | number[] | ((message: Uint8Array) => (boolean | undefined))): this; | ||
expectText(expected?: string | RegExp | ((message: string) => (boolean | void))): this; | ||
expectJson(expected?: JsonValue | ((message: any) => (boolean | void))): this; | ||
expectBinary(expected?: Uint8Array | Buffer | ArrayBuffer | number[] | ((message: Uint8Array) => (boolean | void))): this; | ||
@@ -49,5 +49,5 @@ close(code?: number, reason?: string): this; | ||
expectUpgrade(test: (upgradeResponse: IncomingMessage) => (boolean | undefined)): this; | ||
expectUpgrade(test: (upgradeResponse: IncomingMessage) => (boolean | void)): this; | ||
expectConnectionError(expectedCode?: number | null): Promise<WebSocket>; | ||
expectConnectionError(expectedCode?: number | string | null): Promise<WebSocket>; | ||
} | ||
@@ -54,0 +54,0 @@ |
{ | ||
"name": "superwstest", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "supertest with added WebSocket capabilities", | ||
@@ -50,2 +50,3 @@ "files": [ | ||
"eslint": "7.x", | ||
"eslint-plugin-jest": "23.x", | ||
"jest": "26.x", | ||
@@ -52,0 +53,0 @@ "neutrino": "9.x", |
@@ -346,3 +346,6 @@ # SuperWSTest | ||
request(server).ws('...') | ||
.expectConnectionError(404); // specific error | ||
.expectConnectionError(404); // specific error code | ||
request(server).ws('...') | ||
.expectConnectionError('Server sent an invalid subprotocol'); // specific error message | ||
``` | ||
@@ -349,0 +352,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50916
449
9