Skip to content

Commit 13e8850

Browse files
committed
lint
1 parent 3cc7351 commit 13e8850

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/index.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { Helper } = require('codeceptjs');
1+
const { Helper } = require("codeceptjs");
22
const resemble = require("resemblejs");
33
const fs = require("fs");
44
const assert = require("assert");
@@ -30,7 +30,7 @@ interface Options {
3030
needsSameDimension?: boolean;
3131
outputSettings?: any;
3232
prepareBaseImage?: boolean;
33-
compareWithImage?: any
33+
compareWithImage?: any;
3434
}
3535

3636
interface Endpoint {
@@ -69,7 +69,7 @@ class ResembleHelper extends Helper {
6969
outputDir = require("codeceptjs").config.get().output || "output";
7070
this.baseFolder = this.resolvePath(config.baseFolder);
7171
this.diffFolder = this.resolvePath(config.diffFolder);
72-
this.screenshotFolder = this.resolvePath(config.screenshotFolder || 'output');
72+
this.screenshotFolder = this.resolvePath(config.screenshotFolder || "output");
7373
this.prepareBaseImage = config.prepareBaseImage;
7474
}
7575

@@ -230,15 +230,15 @@ class ResembleHelper extends Helper {
230230
*/
231231

232232
async _addAttachment(baseImage: any, misMatch: any, options: Options) {
233-
const allure: any = require('codeceptjs').container.plugins("allure");
233+
const allure: any = require("codeceptjs").container.plugins("allure");
234234

235235
if (allure !== undefined && misMatch >= options.tolerance) {
236236
allure.addScreenDiff(
237-
'Screen Diff',
238-
fs.readFileSync(this._getBaseImagePath(baseImage, options), { encoding: 'base64' }),
239-
fs.readFileSync(this._getActualImagePath(baseImage), { encoding: 'base64' }),
240-
fs.readFileSync(this._getDiffImagePath(baseImage), { encoding: 'base64' })
241-
)
237+
"Screen Diff",
238+
fs.readFileSync(this._getBaseImagePath(baseImage, options), { encoding: "base64" }),
239+
fs.readFileSync(this._getActualImagePath(baseImage), { encoding: "base64" }),
240+
fs.readFileSync(this._getDiffImagePath(baseImage), { encoding: "base64" }),
241+
);
242242
}
243243
}
244244

@@ -562,25 +562,25 @@ class ResembleHelper extends Helper {
562562
}
563563

564564
_getHelper() {
565-
if (this.helpers['Puppeteer']) {
566-
return this.helpers['Puppeteer'];
565+
if (this.helpers["Puppeteer"]) {
566+
return this.helpers["Puppeteer"];
567567
}
568568

569-
if (this.helpers['WebDriver']) {
570-
return this.helpers['WebDriver'];
569+
if (this.helpers["WebDriver"]) {
570+
return this.helpers["WebDriver"];
571571
}
572-
if (this.helpers['Appium']) {
573-
return this.helpers['Appium'];
572+
if (this.helpers["Appium"]) {
573+
return this.helpers["Appium"];
574574
}
575-
if (this.helpers['WebDriverIO']) {
576-
return this.helpers['WebDriverIO'];
575+
if (this.helpers["WebDriverIO"]) {
576+
return this.helpers["WebDriverIO"];
577577
}
578-
if (this.helpers['TestCafe']) {
579-
return this.helpers['TestCafe'];
578+
if (this.helpers["TestCafe"]) {
579+
return this.helpers["TestCafe"];
580580
}
581581

582-
if (this.helpers['Playwright']) {
583-
return this.helpers['Playwright'];
582+
if (this.helpers["Playwright"]) {
583+
return this.helpers["Playwright"];
584584
}
585585

586586
throw Error(`No matching helper found. Supported helpers: ${supportedHelper.join("/")}`);

0 commit comments

Comments
 (0)