@@ -118,7 +118,7 @@ describe("cleanupImagesTask", () => {
118
118
) ;
119
119
} ;
120
120
121
- describe ( ' when testing type does not match' , ( ) => {
121
+ describe ( " when testing type does not match" , ( ) => {
122
122
it ( "does not remove unused screenshot" , async ( ) => {
123
123
const { path : projectRoot } = await dir ( ) ;
124
124
const screenshotPath = await writeTmpFixture (
@@ -129,14 +129,14 @@ describe("cleanupImagesTask", () => {
129
129
cleanupImagesTask ( {
130
130
projectRoot,
131
131
env : { pluginVisualRegressionCleanupUnusedImages : true } ,
132
- testingType : ' component' ,
132
+ testingType : " component" ,
133
133
} as unknown as Cypress . PluginConfigOptions ) ;
134
134
135
135
expect ( existsSync ( screenshotPath ) ) . toBe ( true ) ;
136
136
} ) ;
137
137
} ) ;
138
138
139
- describe ( ' when testing type matches' , ( ) => {
139
+ describe ( " when testing type matches" , ( ) => {
140
140
it ( "does not remove used screenshot" , async ( ) => {
141
141
const { path : projectRoot } = await dir ( ) ;
142
142
const screenshotPath = await writeTmpFixture (
@@ -147,7 +147,7 @@ describe("cleanupImagesTask", () => {
147
147
cleanupImagesTask ( {
148
148
projectRoot,
149
149
env : { pluginVisualRegressionCleanupUnusedImages : true } ,
150
- testingType : ' e2e' ,
150
+ testingType : " e2e" ,
151
151
} as unknown as Cypress . PluginConfigOptions ) ;
152
152
153
153
expect ( existsSync ( screenshotPath ) ) . toBe ( true ) ;
@@ -163,7 +163,7 @@ describe("cleanupImagesTask", () => {
163
163
cleanupImagesTask ( {
164
164
projectRoot,
165
165
env : { pluginVisualRegressionCleanupUnusedImages : true } ,
166
- testingType : ' e2e' ,
166
+ testingType : " e2e" ,
167
167
} as unknown as Cypress . PluginConfigOptions ) ;
168
168
169
169
expect ( existsSync ( screenshotPath ) ) . toBe ( false ) ;
@@ -205,7 +205,10 @@ describe("compareImagesTask", () => {
205
205
describe ( "when old screenshot exists" , ( ) => {
206
206
it ( "resolves with a success message" , async ( ) =>
207
207
expect (
208
- compareImagesTask ( { testingType : 'e2e' } , await generateConfig ( { updateImages : true } ) )
208
+ compareImagesTask (
209
+ { testingType : "e2e" } ,
210
+ await generateConfig ( { updateImages : true } )
211
+ )
209
212
) . resolves . toEqual ( {
210
213
message :
211
214
"Image diff factor (0%) is within boundaries of maximum threshold option 0.5." ,
@@ -224,7 +227,9 @@ describe("compareImagesTask", () => {
224
227
const cfg = await generateConfig ( { updateImages : false } ) ;
225
228
await fs . unlink ( cfg . imgOld ) ;
226
229
227
- await expect ( compareImagesTask ( { testingType : 'e2e' } , cfg ) ) . resolves . toEqual ( {
230
+ await expect (
231
+ compareImagesTask ( { testingType : "e2e" } , cfg )
232
+ ) . resolves . toEqual ( {
228
233
message :
229
234
"Image diff factor (0%) is within boundaries of maximum threshold option 0.5." ,
230
235
imgDiff : 0 ,
@@ -241,7 +246,9 @@ describe("compareImagesTask", () => {
241
246
it ( "resolves with an error message" , async ( ) => {
242
247
const cfg = await generateConfig ( { updateImages : false } ) ;
243
248
244
- await expect ( compareImagesTask ( { testingType : 'e2e' } , cfg ) ) . resolves . toMatchSnapshot ( ) ;
249
+ await expect (
250
+ compareImagesTask ( { testingType : "e2e" } , cfg )
251
+ ) . resolves . toMatchSnapshot ( ) ;
245
252
} ) ;
246
253
} ) ;
247
254
@@ -250,7 +257,9 @@ describe("compareImagesTask", () => {
250
257
const cfg = await generateConfig ( { updateImages : false } ) ;
251
258
await writeTmpFixture ( cfg . imgNew , oldImgFixture ) ;
252
259
253
- await expect ( compareImagesTask ( { testingType : 'e2e' } , cfg ) ) . resolves . toMatchSnapshot ( ) ;
260
+ await expect (
261
+ compareImagesTask ( { testingType : "e2e" } , cfg )
262
+ ) . resolves . toMatchSnapshot ( ) ;
254
263
} ) ;
255
264
} ) ;
256
265
} ) ;
0 commit comments