You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.js
+6-1
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ const mkdirp = require('mkdirp');
5
5
constgetDirName=require('path').dirname;
6
6
constAWS=require('aws-sdk');
7
7
constpath=require('path');
8
+
constsizeOf=require('image-size');
8
9
9
10
/**
10
11
* Resemble.js helper class for CodeceptJS, this allows screen comparison
@@ -54,7 +55,11 @@ class ResembleHelper extends Helper {
54
55
if(err){
55
56
reject(err);
56
57
}else{
57
-
if(!data.isSameDimensions)reject(newError("The images are not of same dimensions. Please use images of same dimensions so as to avoid any unexpected results."));
58
+
if(!data.isSameDimensions){
59
+
letdimensions1=sizeOf(image1);
60
+
letdimensions2=sizeOf(image2);
61
+
reject(newError("The image1 is of "+dimensions1.height+" X "+dimensions1.width+" and image2 is of "+dimensions2.height+" X "+dimensions2.width+". Please use images of same dimensions so as to avoid any unexpected results."));
0 commit comments