File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,14 @@ import minimist from 'minimist';
33import path from 'path' ;
44import pixelmatch from 'pixelmatch' ;
55import { PNG } from 'pngjs' ;
6+ import { fileURLToPath } from 'url' ;
67import common from '../../tasks/util/common.js' ;
78import constants from '../../tasks/util/constants.js' ;
89import getImagePaths from './assets/get_image_paths.js' ;
910import getMockList from './assets/get_mock_list.js' ;
1011
12+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
13+
1114fs . mkdirSync ( constants . pathToTestImagesDiff , { recursive : true } ) ;
1215
1316/**
@@ -60,7 +63,8 @@ argv._.forEach((pattern) => {
6063
6164const skipped = new Set ( ) ;
6265const failed = new Set ( ) ;
63- const disallowListPath = path . join ( import . meta. dirname , 'disallow_list.json' ) ;
66+ // TODO: In Node 20+, replace with: import disallowListData from './disallow_list.json' with { type: 'json' };
67+ const disallowListPath = path . join ( __dirname , 'disallow_list.json' ) ;
6468const disallowList = new Set ( JSON . parse ( fs . readFileSync ( disallowListPath ) ) ) ;
6569const flakyList = new Set ( [ 'gl3d_bunny-hull' ] ) ;
6670const flakyListMaps = new Set ( [
You can’t perform that action at this time.
0 commit comments