Skip to content

Commit 9df935b

Browse files
committed
Switch compare script to ESM
1 parent 519976c commit 9df935b

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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';
1010

1111
fs.mkdirSync(constants.pathToTestImagesDiff, { recursive: true });
1212

@@ -60,7 +60,7 @@ argv._.forEach((pattern) => {
6060

6161
const skipped = new Set();
6262
const failed = new Set();
63-
const disallowListPath = path.join(__dirname, 'disallow_list.json');
63+
const disallowListPath = path.join(import.meta.dirname, 'disallow_list.json');
6464
const disallowList = new Set(JSON.parse(fs.readFileSync(disallowListPath)));
6565
const flakyList = new Set(['gl3d_bunny-hull']);
6666
const flakyListMaps = new Set([

0 commit comments

Comments
 (0)