Socket
Socket
Sign inDemoInstall

@rpii/wdio-report-events

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 0.2.0

2

lib/wdio-report-events.d.ts
export default class ReportEvents {
logMessage(message: string): any;
logScreenshot(filename: string): any;
videoCapture(filename: string): this;
connectMessageEvent(fn: any): any;
connectScreenshotEvent(fn: any): any;
connectVideoCaptureEvent(fn: any): this;
}

@@ -14,2 +14,7 @@ "use strict";

;
videoCapture(filename) {
process.emit('test:video-capture', filename);
return this;
}
;
connectMessageEvent(fn) {

@@ -25,3 +30,8 @@ process.on('test:log', fn);

;
connectVideoCaptureEvent(fn) {
process.on('test:video-capture', fn);
return this;
}
;
}
exports.default = ReportEvents;

4

package.json
{
"name": "@rpii/wdio-report-events",
"version": "0.1.4",
"description": "Abstracts the event driven messaging to pass screenshots and log data to webdriverio reports",
"version": "0.2.0",
"description": "Abstracts the event driven messaging to pass screenshots, videos and log data to the report module",
"main": "lib/wdio-report-events",

@@ -6,0 +6,0 @@ "types": "lib/wdio-report-events.d.ts",

@@ -12,2 +12,6 @@ import ReportEvents from "../src/wdio-report-events" ;

saveVideo(filepath:string ) {
console.log("video capture event sink:" + filepath) ;
expect(true,"video capture event fired:" + filepath) ;
}
saveMessage(message:string) {

@@ -24,2 +28,3 @@ console.log("message event sink:" + message)

proxy.connectScreenshotEvent(eventSink.saveScreenshot.bind(this));
proxy.connectVideoCaptureEvent(eventSink.saveVideo.bind(this));
test('fire log message', function () {

@@ -34,2 +39,6 @@ console.log("firing message event") ;

});
test('fire video capture', function () {
console.log("firing video capture event") ;
proxy.videoCapture("test.mp4");
});
});
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc