|
1 | | -const common = require('../../tasks/util/common'); |
2 | | -const constants = require('../../tasks/util/constants'); |
3 | | -const getImagePaths = require('./assets/get_image_paths'); |
4 | | -const getMockList = require('./assets/get_mock_list'); |
5 | | -const fs = require('fs'); |
6 | | -const minimist = require('minimist'); |
7 | | -const path = require('path'); |
8 | | -const pixelmatch = require('pixelmatch'); |
9 | | -const { PNG } = require('pngjs'); |
| 1 | +import fs from 'fs'; |
| 2 | +import minimist from 'minimist'; |
| 3 | +import path from 'path'; |
| 4 | +import pixelmatch from 'pixelmatch'; |
| 5 | +import { PNG } from 'pngjs'; |
| 6 | +import common from '../../tasks/util/common.js'; |
| 7 | +import constants from '../../tasks/util/constants.js'; |
| 8 | +import getImagePaths from './assets/get_image_paths.js'; |
| 9 | +import getMockList from './assets/get_mock_list.js'; |
10 | 10 |
|
11 | 11 | fs.mkdirSync(constants.pathToTestImagesDiff, { recursive: true }); |
12 | 12 |
|
@@ -60,7 +60,7 @@ argv._.forEach((pattern) => { |
60 | 60 |
|
61 | 61 | const skipped = new Set(); |
62 | 62 | const failed = new Set(); |
63 | | -const disallowListPath = path.join(__dirname, 'disallow_list.json'); |
| 63 | +const disallowListPath = path.join(import.meta.dirname, 'disallow_list.json'); |
64 | 64 | const disallowList = new Set(JSON.parse(fs.readFileSync(disallowListPath))); |
65 | 65 | const flakyList = new Set(['gl3d_bunny-hull']); |
66 | 66 | const flakyListMaps = new Set([ |
|
0 commit comments