diff --git a/packages/images-plugin/package.json b/packages/images-plugin/package.json index c2486b342..568916619 100644 --- a/packages/images-plugin/package.json +++ b/packages/images-plugin/package.json @@ -34,9 +34,9 @@ ], "scripts": { "test": "npm run test:unit", - "test:e2e": "mocha --timeout 40s --slow 20s \"./test/e2e/**/*.spec.js\"", + "test:e2e": "mocha --timeout 40s --slow 20s \"./test/e2e/**/*.spec.*js\"", "test:smoke": "node ./index.js", - "test:unit": "mocha \"./test/unit/**/*.spec.js\"" + "test:unit": "mocha \"./test/unit/**/*.spec.*js\"" }, "dependencies": { "@appium/opencv": "^3.0.8", diff --git a/packages/images-plugin/test/e2e/plugin.e2e.spec.js b/packages/images-plugin/test/e2e/plugin.e2e.spec.cjs similarity index 99% rename from packages/images-plugin/test/e2e/plugin.e2e.spec.js rename to packages/images-plugin/test/e2e/plugin.e2e.spec.cjs index 0ecab3842..58a2a531f 100644 --- a/packages/images-plugin/test/e2e/plugin.e2e.spec.js +++ b/packages/images-plugin/test/e2e/plugin.e2e.spec.cjs @@ -2,7 +2,7 @@ import _ from 'lodash'; import path from 'path'; import {remote as wdio} from 'webdriverio'; import {MATCH_FEATURES_MODE, GET_SIMILARITY_MODE} from '../../lib/constants'; -import {TEST_IMG_1_B64, TEST_IMG_2_B64, APPSTORE_IMG_PATH} from '../fixtures'; +import {TEST_IMG_1_B64, TEST_IMG_2_B64, APPSTORE_IMG_PATH} from '../fixtures/index.cjs'; import {pluginE2EHarness} from '@appium/plugin-test-support'; import {tempDir, fs} from '@appium/support'; import sharp from 'sharp'; diff --git a/packages/images-plugin/test/fixtures/index.js b/packages/images-plugin/test/fixtures/index.cjs similarity index 100% rename from packages/images-plugin/test/fixtures/index.js rename to packages/images-plugin/test/fixtures/index.cjs diff --git a/packages/images-plugin/test/unit/finder.spec.js b/packages/images-plugin/test/unit/finder.spec.js index 4ce5dd3bb..faf6e525e 100644 --- a/packages/images-plugin/test/unit/finder.spec.js +++ b/packages/images-plugin/test/unit/finder.spec.js @@ -6,7 +6,7 @@ import {IMAGE_STRATEGY} from '../../lib/constants'; import ImageElementFinder from '../../lib/finder'; import {ImageElement} from '../../lib/image-element'; import sinon from 'sinon'; -import {TINY_PNG, TiNY_PNG_BUF, TINY_PNG_DIMS} from '../fixtures'; +import {TINY_PNG, TiNY_PNG_BUF, TINY_PNG_DIMS} from '../fixtures/index.cjs'; import sharp from 'sharp'; const compareModule = require('../../lib/compare'); diff --git a/packages/images-plugin/test/unit/plugin.spec.js b/packages/images-plugin/test/unit/plugin.spec.js index 6ae8b451e..eef66404a 100644 --- a/packages/images-plugin/test/unit/plugin.spec.js +++ b/packages/images-plugin/test/unit/plugin.spec.js @@ -7,7 +7,7 @@ import { IMAGE_STRATEGY, } from '../../lib/constants'; import {BaseDriver} from 'appium/driver'; -import {TEST_IMG_1_B64, TEST_IMG_2_B64, TEST_IMG_2_PART_B64} from '../fixtures'; +import {TEST_IMG_1_B64, TEST_IMG_2_B64, TEST_IMG_2_PART_B64} from '../fixtures/index.cjs'; import {util} from '@appium/support'; describe('ImageElementPlugin#handle', function () {