chore(base-driver): revert name change of TEST_HOST to DEFAULT_TEST_HOST
This would have been a breaking change if other packages depend on it, since I think it's a public API
MODIFY
packages/base-driver/test/basedriver/driver-e2e-tests.js
packages/base-driver/test/basedriver/driver-e2e-tests.js
@@ -5,12 +5,12 @@ import {
} from '../../lib/constants';
import axios from 'axios';
import B from 'bluebird';
-import {DEFAULT_TEST_HOST, getTestPort, createAppiumURL, METHODS} from '../helpers';
+import {TEST_HOST, getTestPort, createAppiumURL, METHODS} from '../helpers';
import { PREFIXED_APPIUM_OPTS_CAP } from '../../lib/basedriver/capabilities';
const {POST, DELETE} = METHODS;
function baseDriverE2ETests (DriverClass, defaultCaps = {}) {
- let address = defaultCaps['appium:address'] ?? DEFAULT_TEST_HOST;
+ let address = defaultCaps['appium:address'] ?? TEST_HOST;
let port = defaultCaps['appium:port'];
const className = DriverClass.name || '(unknown driver)';
@@ -42,7 +42,7 @@ function baseDriverE2ETests (DriverClass, defaultCaps = {}) {
baseServer = await server({
routeConfiguringFunction: routeConfiguringFunction(d),
port,
- hostname: DEFAULT_TEST_HOST
+ hostname: TEST_HOST
});
createAppiumTestURL = createAppiumURL(address, port);
newSessionURL = createAppiumTestURL('', 'session');

MODIFY
packages/base-driver/test/helpers.js
packages/base-driver/test/helpers.js
import getPort from 'get-port';
import {curry} from 'lodash';
-const DEFAULT_TEST_HOST = '127.0.0.1';
+const TEST_HOST = '127.0.0.1';
/**
* Some HTTP methods, for your pleasure
@@ -69,4 +69,4 @@ const createAppiumURL = curry(
4,
);
-export {DEFAULT_TEST_HOST, METHODS, getTestPort, createAppiumURL};
+export {TEST_HOST, METHODS, getTestPort, createAppiumURL};

MODIFY
packages/base-driver/test/jsonwp-proxy/url-specs.js
packages/base-driver/test/jsonwp-proxy/url-specs.js
// transpile:mocha
import { JWProxy } from '../..';
-import { getTestPort, DEFAULT_TEST_HOST, createAppiumURL } from '../helpers';
+import { getTestPort, TEST_HOST, createAppiumURL } from '../helpers';
import _ from 'lodash';
describe('JWProxy', function () {
@@ -19,12 +19,12 @@ describe('JWProxy', function () {
const PROXY_STATUS_URL = createProxyURL('', 'status');
function createJWProxy (opts = {}) {
- return new JWProxy({server: DEFAULT_TEST_HOST, port, ...opts});
+ return new JWProxy({server: TEST_HOST, port, ...opts});
}
before(async function () {
port = await getTestPort();
- createTestURL = createAppiumURL(DEFAULT_TEST_HOST, port);
+ createTestURL = createAppiumURL(TEST_HOST, port);
testStatusURL = createTestURL('', 'status');
createTestSessionURL = createTestURL(_, '');
testNewSessionURL = createTestURL('', 'session');
@@ -41,7 +41,7 @@ describe('JWProxy', function () {
let incomingUrl = PROXY_STATUS_URL;
let j = createJWProxy({scheme: 'HTTPS'});
let proxyUrl = j.getUrlForProxy(incomingUrl);
- proxyUrl.should.equal(createAppiumURL(`https://${DEFAULT_TEST_HOST}`, port, '', 'status'));
+ proxyUrl.should.equal(createAppiumURL(`https://${TEST_HOST}`, port, '', 'status'));
});
it('should translate the base', function () {
let incomingUrl = PROXY_STATUS_URL;

chore(base-driver): revert name change of TEST_HOST to DEFAULT_TEST_HOST

This would have been a breaking change if other packages depend on it, since I think it's a public API