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

codeceptjs-video-helper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codeceptjs-video-helper - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

29

index.js

@@ -17,19 +17,24 @@ const path = require('path')

if(!videoDir) return
const mainVideo = pw.page?.video()
let mainVideoPath = mainVideo && await mainVideo.path()
if(mainVideoPath) mainVideoPath = path.relative(videoDir, mainVideoPath)
this.start = this.events[0].at
for(const event of this.events) {
if(event.video) {
event.video = path.relative(videoDir, await event.video.path())
if(this.events.length) {
this.start = this.events[0].at
for (const event of this.events) {
if (event.video) {
event.video = path.relative(videoDir, await event.video.path())
}
event.at -= this.start
}
event.at -= this.start
}
this.events.unshift({ type:'init', video: mainVideoPath })
const scenarioJson = this.events.map(x => JSON.stringify(x)).join('\n')
//console.log("EVENTS:\n" + scenarioJson)
await fs.promises.writeFile(path.resolve(videoDir, 'scenario.json'), scenarioJson)
const mainVideo = pw.page?.video()
if(!mainVideo) return
/// TODO: rewrite mlt export for multiple tests support
let mainVideoPath = await mainVideo.path()
mainVideoPath = path.relative(videoDir, mainVideoPath)
const videos = Array.from(new Set(
(mainVideoPath && [mainVideoPath]).concat(this.events.map(ev => ev.video).filter(x => !!x))
[mainVideoPath].concat(this.events.map(ev => ev.video).filter(x => !!x))
))

@@ -36,0 +41,0 @@ const producers = videos.map(video =>

{
"name": "codeceptjs-video-helper",
"version": "0.1.2",
"version": "0.1.3",
"description": "CodeceptJS Helper for multi sesssion video recording",

@@ -5,0 +5,0 @@ "main": "index.js",

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