Skip to content

Commit

Permalink
fix: ensure right image states order html-reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovRoman committed Mar 26, 2024
1 parent 26a6408 commit 85998c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/images-info-saver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ export class ImagesInfoSaver extends EventEmitter2 {
const testDebug = debug.extend(testResult.imageDir);
testDebug(`Saving images of ${testResult.id}`);

const newImagesInfos: ImageInfoFull[] = [];

await Promise.all(testResult.imagesInfo.map(async (imagesInfo, index) => {
const newImagesInfos = await Promise.all(testResult.imagesInfo.map(async (imagesInfo, index) => {
const imageDebug = testDebug.extend(index.toString());
imageDebug.enabled && imageDebug('Handling %j', removeBufferFromImagesInfo(imagesInfo));

Expand All @@ -79,7 +77,7 @@ export class ImagesInfoSaver extends EventEmitter2 {

await actions.onIdle();

newImagesInfos.push(_.omitBy(newImagesInfo, _.isNil) as ImageInfoFull);
return _.omitBy(newImagesInfo, _.isNil) as ImageInfoFull;
}));

await this.emitAsync(PluginEvents.TEST_SCREENSHOTS_SAVED, {
Expand Down

0 comments on commit 85998c7

Please sign in to comment.