diff --git a/package.json b/package.json index c751f6d..2e29a90 100644 --- a/package.json +++ b/package.json @@ -36,34 +36,29 @@ "eslint-config-google": "^0.7.1", "express": "^4.14.0", "firebase": "^3.5.1", - "geckodriver": "^1.3.0", + "geckodriver": "^1.6.0", "glob": "^7.1.1", "istanbul": "^0.4.5", "jsdoc": "^3.4.1", "mocha": "^3.1.2", "operadriver": "^1.0.0", "proxyquire": "^1.7.10", - "sinon": "^1.17.6" + "sinon": "^2.1.0" }, "dependencies": { "chalk": "^1.1.3", "del": "^2.2.0", "dmg": "^0.1.0", - "fs-extra": "^1.0.0", + "fs-extra": "^2.1.2", "mkdirp": "^0.5.1", "node-localstorage": "^1.3.0", "request": "^2.78.0", "sauce-connect-launcher": "^1.0.0", - "selenium-webdriver": "3.0.1", + "selenium-webdriver": "3.4.0", "semver": "^5.3.0", "which": "^1.2.11", "yauzl": "^2.7.0" }, - "optionalDependencies": { - "chromedriver": "^2.26.1", - "geckodriver": "^1.2.0", - "operadriver": "^1.0.0" - }, "files": [ "src/" ] diff --git a/test/browser-usage.js b/test/browser-usage.js index d053729..dc5865a 100644 --- a/test/browser-usage.js +++ b/test/browser-usage.js @@ -116,7 +116,7 @@ describe('Test Usage of Browsers', function() { it('should get null for raw version output if no executable found', function() { sinonStubs.push( - sinon.stub(localBrowser, 'getExecutablePath', () => { + sinon.stub(localBrowser, 'getExecutablePath').callsFake(() => { return null; }) ); @@ -130,7 +130,7 @@ describe('Test Usage of Browsers', function() { it('should get -1 for version number if no executable found', function() { sinonStubs.push( - sinon.stub(localBrowser, 'getExecutablePath', () => { + sinon.stub(localBrowser, 'getExecutablePath').callsFake(() => { return null; }) ); @@ -144,7 +144,7 @@ describe('Test Usage of Browsers', function() { it('should get -1 for an unexpected raw version string', function() { sinonStubs.push( - sinon.stub(localBrowser, 'getRawVersionString', () => { + sinon.stub(localBrowser, 'getRawVersionString').callsFake(() => { return 'ImTotallyMadeUp 12345678.asdf.12345678.asdf'; }) ); diff --git a/test/expiration-behavior.js b/test/expiration-behavior.js index 727005d..56a71f2 100644 --- a/test/expiration-behavior.js +++ b/test/expiration-behavior.js @@ -104,19 +104,20 @@ describe('Test Download Manager - Browser Expiration', function() { before(function() { seleniumAssistant.setBrowserInstallDir(testPath); - const dlChromeStub = sinon.stub(downloadManager, '_downlaodChrome', - (release, installDir) => { + const dlChromeStub = sinon.stub(downloadManager, '_downlaodChrome') + .callsFake((release, installDir) => { browserDownloads.chrome[release] = true; return Promise.resolve(); }); - const dlFFStub = sinon.stub(downloadManager, '_downloadFirefox', - (release, installDir) => { + const dlFFStub = sinon.stub(downloadManager, '_downloadFirefox') + .callsFake((release, installDir) => { browserDownloads.firefox[release] = true; return Promise.resolve(); }); - const isValidStub = sinon.stub(LocalBrowser.prototype, 'isValid', () => { + const isValidStub = sinon.stub(LocalBrowser.prototype, 'isValid') + .callsFake(() => { return true; }); diff --git a/test/local-browser.js b/test/local-browser.js index 70bdee5..51f7c9c 100644 --- a/test/local-browser.js +++ b/test/local-browser.js @@ -45,7 +45,8 @@ describe('LocalBrowser', function() { // getPrettyReleaseNames needs to be stubbed since we are instantiating // LocalBrowser directly rather than extending it. - const stub = sinon.stub(LocalBrowser, 'getPrettyReleaseNames', () => { + const stub = sinon.stub(LocalBrowser, 'getPrettyReleaseNames') + .callsFake(() => { return releaseNames; }); sinonStubs.push(stub); @@ -253,7 +254,8 @@ describe('LocalBrowser', function() { 'exampledriver': null, }); - const stub = sinon.stub(ProxiedLocalBrowser, 'getPrettyReleaseNames', () => { + const stub = sinon.stub(ProxiedLocalBrowser, 'getPrettyReleaseNames') + .callsFake(() => { return releaseNames; }); sinonStubs.push(stub); @@ -281,7 +283,8 @@ describe('LocalBrowser', function() { }, }); - const stub = sinon.stub(ProxiedLocalBrowser, 'getPrettyReleaseNames', () => { + const stub = sinon.stub(ProxiedLocalBrowser, 'getPrettyReleaseNames') + .callsFake(() => { return releaseNames; }); sinonStubs.push(stub); diff --git a/test/selenium-assistant.js b/test/selenium-assistant.js index 3e25475..0b2696d 100644 --- a/test/selenium-assistant.js +++ b/test/selenium-assistant.js @@ -103,7 +103,7 @@ describe('SeleniumAssistant', function() { this.timeout(NUM_OF_BROWSERS * 3000 * 1000); let consoleCalls = 0; - const stub = sinon.stub(console, 'log', (input) => { + const stub = sinon.stub(console, 'log').callsFake((input) => { consoleCalls++; }); sinonStubs.push(stub); @@ -121,7 +121,7 @@ describe('SeleniumAssistant', function() { this.timeout(NUM_OF_BROWSERS * 3000 * 1000); let consoleCalls = 0; - const stub = sinon.stub(console, 'log', () => { + const stub = sinon.stub(console, 'log').callsFake(() => { consoleCalls++; }); sinonStubs.push(stub);