@relaycorp/ws-mock
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -27,1 +27,6 @@ import { Data } from 'ws'; | ||
} | ||
export declare class EmitClientErrorAction extends MockServerAction { | ||
protected readonly error: Error; | ||
constructor(error: Error); | ||
run(mockServer: MockServer): Promise<void>; | ||
} |
"use strict"; | ||
// tslint:disable:max-classes-per-file | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ReceiveMessageAction = exports.SendMessageAction = exports.CloseConnectionAction = exports.AcceptConnectionAction = exports.MockServerAction = void 0; | ||
exports.EmitClientErrorAction = exports.ReceiveMessageAction = exports.SendMessageAction = exports.CloseConnectionAction = exports.AcceptConnectionAction = exports.MockServerAction = void 0; | ||
class MockServerAction { | ||
@@ -67,2 +67,12 @@ constructor() { | ||
exports.ReceiveMessageAction = ReceiveMessageAction; | ||
class EmitClientErrorAction extends MockServerAction { | ||
constructor(error) { | ||
super(); | ||
this.error = error; | ||
} | ||
async run(mockServer) { | ||
await mockServer.abort(this.error); | ||
} | ||
} | ||
exports.EmitClientErrorAction = EmitClientErrorAction; | ||
function waitForSetImmediate() { | ||
@@ -69,0 +79,0 @@ return new Promise((resolve) => setImmediate(resolve)); |
@@ -27,1 +27,6 @@ import { Data } from 'ws'; | ||
} | ||
export declare class EmitClientErrorAction extends MockServerAction { | ||
protected readonly error: Error; | ||
constructor(error: Error); | ||
run(mockServer: MockServer): Promise<void>; | ||
} |
@@ -59,2 +59,11 @@ // tslint:disable:max-classes-per-file | ||
} | ||
export class EmitClientErrorAction extends MockServerAction { | ||
constructor(error) { | ||
super(); | ||
this.error = error; | ||
} | ||
async run(mockServer) { | ||
await mockServer.abort(this.error); | ||
} | ||
} | ||
function waitForSetImmediate() { | ||
@@ -61,0 +70,0 @@ return new Promise((resolve) => setImmediate(resolve)); |
{ | ||
"name": "@relaycorp/ws-mock", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "email": "no-reply@relaycorp.tech", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
47983
763