Fix reset tests for importation
MODIFY
test/basedriver/driver-tests.js
test/basedriver/driver-tests.js
@@ -5,6 +5,7 @@ import B from 'bluebird';
import { DeviceSettings } from '../..';
import BaseDriver from "../../lib/basedriver/driver";
+
const should = chai.should();
chai.use(chaiAsPromised);
@@ -406,11 +407,11 @@ function baseDriverUnitTests (DriverClass, defaultCaps = {}) {
describe('.reset', function () {
it('should reset as W3C if the original session was W3C', async function () {
const caps = {
- alwaysMatch: {
+ alwaysMatch: Object.assign({}, defaultCaps, {
deviceName: 'Fake',
automationName: 'Fake',
platformName: 'Fake',
- },
+ }),
firstMatch: [{}],
};
await d.createSession(undefined, undefined, caps);
@@ -419,11 +420,11 @@ function baseDriverUnitTests (DriverClass, defaultCaps = {}) {
d.protocol.should.equal('W3C');
});
it('should reset as MJSONWP if the original session was MJSONWP', async function () {
- const caps = {
+ const caps = Object.assign({}, defaultCaps, {
deviceName: 'Fake',
automationName: 'Fake',
platformName: 'Fake',
- };
+ });
await d.createSession(caps);
d.protocol.should.equal('MJSONWP');
await d.reset();

Fix reset tests for importation (#224)