🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@testring/test-utils

Package Overview
Dependencies
Maintainers
1
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testring/test-utils - npm Package Compare versions

Comparing version
0.3.2
to
0.3.3
+2
-2
package.json
{
"name": "@testring/test-utils",
"version": "0.3.2",
"version": "0.3.3",
"main": "./src/index.ts",

@@ -13,4 +13,4 @@ "types": "./src/index.ts",

"dependencies": {
"@testring/types": "0.3.2"
"@testring/types": "0.3.3"
}
}

@@ -5,2 +5,3 @@ import { EventEmitter } from 'events';

export class TransportMock extends EventEmitter implements ITransport {

@@ -23,2 +24,6 @@

public broadcastFrom<T = any>(messageType: string, payload: T, processId: string) {
this.emit(messageType, payload, processId);
}
public broadcastLocal<T = any>(messageType: string, payload: T) {

@@ -40,3 +45,3 @@ this.emit(messageType, payload);

public once(messageType, callback): any {
public once<T = any>(messageType: string, callback: (m: T, source?: string) => void): any {
super.on(messageType, callback);

@@ -47,3 +52,3 @@

public onceFrom(processID, messageType, callback): any {
public onceFrom<T = any>(processID: string, messageType: string, callback: (m: T, source?: string) => void): any {
const handler = (message, source) => {

@@ -50,0 +55,0 @@ if (processID === source) {