File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,32 @@ import glob from 'fast-glob';
3
3
import fse from 'fs-extra' ;
4
4
import lodashChunk from 'lodash/chunk.js' ;
5
5
import { upload } from '@argos-ci/core' ;
6
+ import yargs from 'yargs' ;
6
7
7
8
const screenshotsBase = 'test/regressions/screenshots/chrome' ;
8
9
const screenshotsPigmentCSSBase = 'screenshots/chrome' ;
9
10
const screenshotsTmp = 'test/regressions/screenshots/argos' ;
10
11
const BATCH_SIZE = 200 ;
11
12
13
+ const argv = yargs ( process . argv . slice ( 2 ) ) . option ( 'verbose' , {
14
+ alias : 'v' ,
15
+ type : 'boolean' ,
16
+ description : 'Run with verbose logging' ,
17
+ } ) . argv ;
18
+
12
19
async function run ( ) {
13
20
const emotionScreenshots = await glob ( `${ screenshotsBase } /**/*` ) ;
14
21
const pigmentCSSScnreeshots = await glob ( `${ screenshotsPigmentCSSBase } /**/*` ) ;
15
22
const screenshots = [ ...emotionScreenshots , ...pigmentCSSScnreeshots ] ;
23
+
24
+ console . log ( `Found ${ screenshots . length } screenshots.` ) ;
25
+ if ( argv . verbose ) {
26
+ console . log ( 'Screenshots found:' ) ;
27
+ screenshots . forEach ( ( screenshot ) => {
28
+ console . log ( ` - ${ screenshot } ` ) ;
29
+ } ) ;
30
+ }
31
+
16
32
const chunks = lodashChunk ( screenshots , BATCH_SIZE ) ;
17
33
18
34
await Promise . all (
You can’t perform that action at this time.
0 commit comments