test(base-driver): replace direct calls to sinon with a sandbox
This is safer, because test failures can happen due to lack of isolation and order in which tests are executed
MODIFY
packages/base-driver/test/basedriver/capability-specs.js
packages/base-driver/test/basedriver/capability-specs.js
import { default as BaseDriver, errors } from '../../lib';
import logger from '../../lib/basedriver/logger';
-import sinon from 'sinon';
+import { createSandbox } from 'sinon';
describe('Desired Capabilities', function () {
let d;
+ let sandbox;
beforeEach(function () {
d = new BaseDriver();
- sinon.spy(logger, 'warn');
+ sandbox = createSandbox();
+ sandbox.spy(logger, 'warn');
});
afterEach(function () {
- logger.warn.restore();
+ sandbox.restore();
});
it('should require platformName and deviceName', async function () {

test(base-driver): replace direct calls to sinon with a sandbox

This is safer, because test failures can happen due to lack of isolation and order in which tests are executed