Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

superwstest

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superwstest - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

12

index.d.ts

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc