The video path is incorrect when the parsed video filename includes a leading separator.
For example, for the string src/integration/systemAlert/systemAlert.spec.js, the baseFolder is parsed as src/integration/systemAlert so createVideoContext returns videos//systemAlert.spec.js.mp4 as the value. This happens with or without defining the videosFolder in the config. The linked PR fixes this issue with path.normalize.
function createVideoContext(video, mochawesomeOptions, baseFolder) {
video = video.replace(baseFolder, '').concat('.mp4');
return {
title: 'Spec video recording',
value: encodeMediaPath(`videos/${video})
};
}
Environment
What happened?
The video path is incorrect when the parsed video filename includes a leading separator. For example, for the string
src/integration/systemAlert/systemAlert.spec.js
, the baseFolder is parsed assrc/integration/systemAlert
socreateVideoContext
returnsvideos//systemAlert.spec.js.mp4
as the value. This happens with or without defining thevideosFolder
in the config. The linked PR fixes this issue withpath.normalize
.Config file
Relevant log output
No response
Anything else?
No response