chore(doctor): remove gulp
removes gulp, builds w/ babel, tests w/ mocha
reorg test files
DELETE
packages/doctor/gulpfile.js
-'use strict';
-
-const gulp = require('gulp');
-const boilerplate = require('@appium/gulp-plugins').boilerplate.use(gulp);
-const DEFAULTS = require('@appium/gulp-plugins').boilerplate.DEFAULTS;
-
-gulp.task('copy-files', () =>
- gulp.src('./test/fixtures/*').pipe(gulp.dest('./build/test/fixtures')),
-);
-
-boilerplate({
- build: 'appium-doctor',
- files: [...DEFAULTS.files, 'bin/**/*.js'],
- postTranspile: ['copy-files'],
-});

MODIFY
packages/doctor/package.json
packages/doctor/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:unit": "mocha --require ../../test/setup-babel.js \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/support": "file:../support",

RENAME
packages/doctor/test/android-specs.js
packages/doctor/test/unit/android.spec.js
-// transpile:mocha
-
-import { EnvVarAndPathCheck, AndroidToolCheck, OptionalAppBundleCheck, OptionalGstreamerCheck } from '../lib/android';
+import { EnvVarAndPathCheck, AndroidToolCheck, OptionalAppBundleCheck, OptionalGstreamerCheck } from '../../lib/android';
import { fs } from '@appium/support';
import * as adb from 'appium-adb';
-import * as utils from '../lib/utils';
+import * as utils from '../../lib/utils';
import * as tp from 'teen_process';
import { withMocks, stubEnv } from '@appium/test-support';
import B from 'bluebird';

RENAME
packages/doctor/test/demo-specs.js
packages/doctor/test/unit/demo.spec.js
-// transpile:mocha
-
-import { DirCheck, FileCheck } from '../lib/demo';
+import { DirCheck, FileCheck } from '../../lib/demo';
import { fs } from '@appium/support';
import * as tp from 'teen_process';
-import * as prompt from '../lib/prompt';
-import log from '../lib/logger';
-import { FixSkippedError } from '../lib/doctor';
+import * as prompt from '../../lib/prompt';
+import log from '../../lib/logger';
+import { FixSkippedError } from '../../lib/doctor';
import { withMocks, withSandbox, stubLog } from '@appium/test-support';
import B from 'bluebird';

RENAME
packages/doctor/test/dev-specs.js
packages/doctor/test/unit/dev.spec.js
-// transpile:mocha
-
-import { BinaryIsInPathCheck, AndroidSdkExists } from '../lib/dev';
+import { BinaryIsInPathCheck, AndroidSdkExists } from '../../lib/dev';
import { fs } from '@appium/support';
import * as tp from 'teen_process';
import { withMocks, stubEnv } from '@appium/test-support';

RENAME
packages/doctor/test/doctor-specs.js
packages/doctor/test/unit/doctor.spec.js
-// transpile:mocha
-
-import { Doctor, DoctorCheck, FixSkippedError } from '../lib/doctor';
+import { Doctor, DoctorCheck, FixSkippedError } from '../../lib/doctor';
import { withSandbox, stubLog } from '@appium/test-support';
-import log from '../lib/logger';
+import log from '../../lib/logger';
import B from 'bluebird';

RENAME
packages/doctor/test/factory-specs.js
packages/doctor/test/unit/factory.spec.js
-// transpile:mocha
-
-import newDoctor from '../lib/factory';
+import newDoctor from '../../lib/factory';
describe('factory', function () {

RENAME
packages/doctor/test/fixtures/wow.txt
packages/doctor/test/unit/fixtures/wow.txt
RENAME
packages/doctor/test/general-specs.js
packages/doctor/test/unit/general.spec.js
-// transpile:mocha
-
import { NodeBinaryCheck, NodeVersionCheck,
- OptionalFfmpegCommandCheck, OptionalMjpegConsumerCommandCheck } from '../lib/general';
+ OptionalFfmpegCommandCheck, OptionalMjpegConsumerCommandCheck } from '../../lib/general';
import * as tp from 'teen_process';
-import * as utils from '../lib/utils';
-import NodeDetector from '../lib/node-detector';
+import * as utils from '../../lib/utils';
+import NodeDetector from '../../lib/node-detector';
import { withMocks } from '@appium/test-support';
import B from 'bluebird';
import { removeColors } from './helper';

RENAME
packages/doctor/test/helper.js
packages/doctor/test/unit/helper.js
RENAME
packages/doctor/test/index-specs.js
packages/doctor/test/unit/index.spec.js
-// transpile:mocha
-
-import { newDoctor, Doctor, DoctorCheck } from '../lib';
+import { newDoctor, Doctor, DoctorCheck } from '../../lib';
describe('index', function () {

RENAME
packages/doctor/test/ios-specs.js
packages/doctor/test/unit/ios.spec.js
-// transpile:mocha
-
import {
fixes, XcodeCheck, XcodeCmdLineToolsCheck, DevToolsSecurityCheck,
OptionalApplesimutilsCommandCheck, OptionalIdbCommandCheck, OptionalIOSDeployCommandCheck,
OptionalLyftCommandCheck
-} from '../lib/ios';
+} from '../../lib/ios';
import { fs, system } from '@appium/support';
-import * as utils from '../lib/utils';
+import * as utils from '../../lib/utils';
import * as tp from 'teen_process';
-import * as prompter from '../lib/prompt';
-import FixSkippedError from '../lib/doctor';
-import log from '../lib/logger';
+import * as prompter from '../../lib/prompt';
+import FixSkippedError from '../../lib/doctor';
+import log from '../../lib/logger';
import B from 'bluebird';
import { withMocks, withSandbox, stubLog } from '@appium/test-support';
import {removeColors} from './helper';

RENAME
packages/doctor/test/node-detector-specs.js
packages/doctor/test/unit/node-detector.spec.js
-// transpile:mocha
-
import { fs, system } from '@appium/support';
import * as tp from 'teen_process';
-import NodeDetector from '../lib/node-detector';
+import NodeDetector from '../../lib/node-detector';
import B from 'bluebird';
import { withSandbox } from '@appium/test-support';
import { EOL } from 'os';

RENAME
packages/doctor/test/prompt-specs.js
packages/doctor/test/unit/prompt.spec.js
-// transpile:mocha
-
-import { fixIt, clear } from '../lib/prompt';
-import { inquirer } from '../lib/utils';
+import { fixIt, clear } from '../../lib/prompt';
+import { inquirer } from '../../lib/utils';
import { withMocks } from '@appium/test-support';
import B from 'bluebird';

RENAME
packages/doctor/test/util-specs.js
packages/doctor/test/unit/util.spec.js
-// transpile:mocha
-
-import { configureBinaryLog, resetLog } from '../lib/utils';
+import { configureBinaryLog, resetLog } from '../../lib/utils';
import { fs } from '@appium/support';
import path from 'path';
-import { Doctor } from '../lib/doctor';
+import { Doctor } from '../../lib/doctor';
describe('utils', function () {

chore(doctor): remove gulp

- removes gulp, builds w/ babel, tests w/ mocha
- reorg test files