chore(opencv): remove gulp
build now happens via babel
test now happens via mocha
renamed/reorganized test files
DELETE
packages/opencv/gulpfile.js
-'use strict';
-
-const gulp = require('gulp');
-const boilerplate = require('@appium/gulp-plugins').boilerplate.use(gulp);
-
-boilerplate({
- build: '@appium/opencv',
- coverage: {
- files: [
- './build/test/**/*-specs.js',
- '!./build/test/images/**',
- '!./build/test/**/*-e2e-specs.js'
- ],
- verbose: true,
- }
-});

MODIFY
packages/opencv/package.json
packages/opencv/package.json
"build"
],
"scripts": {
- "dev": "gulp dev --no-notif",
- "build": "gulp transpile",
- "test": "gulp unit-test:run",
- "test:e2e": "gulp e2e-test:run"
+ "build": "babel lib --root-mode=upward --out-dir=build/lib",
+ "dev": "npm run build -- --watch",
+ "fix": "npm run lint -- --fix",
+ "lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
+ "test": "npm run test:unit",
+ "test:e2e": "mocha --require ../../test/setup-babel.js --timeout 20s --slow 10s \"./test/e2e/**/*.spec.js\"",
+ "test:unit": "mocha --require ../../test/setup-babel.js \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@babel/runtime": "7.17.8",

RENAME
packages/opencv/test/images/appium-diagram.jpg
packages/opencv/test/e2e/images/appium-diagram.jpg
RENAME
packages/opencv/test/images/cc1.png
packages/opencv/test/e2e/images/cc1.png
RENAME
packages/opencv/test/images/cc2.png
packages/opencv/test/e2e/images/cc2.png
RENAME
packages/opencv/test/images/cc_rotated.png
packages/opencv/test/e2e/images/cc_rotated.png
RENAME
packages/opencv/test/images/findwaldo.jpg
packages/opencv/test/e2e/images/findwaldo.jpg
RENAME
packages/opencv/test/images/full-image.b64
packages/opencv/test/e2e/images/full-image.b64
RENAME
packages/opencv/test/images/number5.png
packages/opencv/test/e2e/images/number5.png
RENAME
packages/opencv/test/images/waldo.jpg
packages/opencv/test/e2e/images/waldo.jpg
RENAME
packages/opencv/test/opencv-e2e-specs.js
packages/opencv/test/e2e/opencv.e2e.spec.js
import {
getImagesMatches, getImagesSimilarity, getImageOccurrence
-} from '../lib';
+} from '../../lib';
import path from 'path';
import { fs } from '@appium/support';
-const FIXTURES_ROOT = path.resolve(__dirname, '..', '..', 'test', 'images');
+const FIXTURES_ROOT = path.resolve(__dirname, 'images');
describe('OpenCV helpers', function () {
// OpenCV needs several seconds for initialization

RENAME
packages/opencv/test/opencv-specs.js
packages/opencv/test/unit/opencv.spec.js
-import { initOpenCv } from '../lib';
+import { initOpenCv } from '../../lib';
describe('OpenCV', function () {
it('should initialize opencv library', async function () {

chore(opencv): remove gulp

- build now happens via babel
- test now happens via mocha
- renamed/reorganized test files