diff --git a/package-lock.json b/package-lock.json index 30ee9cc..6a60d5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron-chromedriver", - "version": "4.0.0-beta.4", + "version": "4.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 312a18f..79e1a06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron-chromedriver", - "version": "5.0.0-beta.1", + "version": "4.2.0", "description": "Electron ChromeDriver", "repository": "https://github.com/electron/chromedriver", "bin": { @@ -13,8 +13,8 @@ "author": "Kevin Sawicki", "license": "MIT", "dependencies": { - "electron-download": "^4.1.0", - "extract-zip": "^1.6.5" + "electron-download": "^4.1.1", + "extract-zip": "^1.6.7" }, "devDependencies": { "mocha": "^2.3.3", diff --git a/test/chromedriver-test.js b/test/chromedriver-test.js index 91e1977..700e2f5 100644 --- a/test/chromedriver-test.js +++ b/test/chromedriver-test.js @@ -6,6 +6,13 @@ const { version } = require('../package') const describe = global.describe const it = global.it +const versions = { + 3: 'ChromeDriver 2.36', + 4: 'ChromeDriver 2.40.613160', + 5: 'ChromeDriver 2.45', + 6: 'ChromeDriver 76.0.3783.1' +} + describe('chromedriver binary', function () { this.timeout(10000) @@ -21,11 +28,11 @@ describe('chromedriver binary', function () { chromeDriver.stderr.on('data', data => output += data) chromeDriver.on('close', () => { - if (version.startsWith('3')) { - assert.equal(output.indexOf('ChromeDriver 2.36'), 0, `Unexpected version: ${output}`) - } else if (version.startsWith('4')) { - // see src/chrome/test/chromedriver/embed_version_in_cpp.py - assert.equal(output.indexOf('ChromeDriver 69.0.3497.106'), 0, `Unexpected version: ${output}`) + for (const v in versions) { + if (version.startsWith(v)) { + const idx = output.indexOf(versions[v]) + assert.equal(idx, 0, `Unexpected version: ${output}`) + } } })