@testim/chrome-version
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -26,3 +26,3 @@ 'use strict'; | ||
function extractChromeVersionNumer(chromeVersionString) { | ||
return chromeVersionString.replace(/.+\s([0-9]+(\.[0-9]+)*)\s?.*/, '$1'); | ||
return chromeVersionString.replace(/\D*(([0-9]+\.?)+)\s?.*/, '$1'); | ||
} | ||
@@ -29,0 +29,0 @@ |
{ | ||
"name": "@testim/chrome-version", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Finds the version of Chrome that is installed on your machine", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,3 +15,3 @@ # chrome-version | ||
(async () => { | ||
const { getChromeVersion } = require('chrome-version'); | ||
const { getChromeVersion } = require('@testim/chrome-version'); | ||
const includeChromium = false; // NOTE: set to true to also search for Chromium | ||
@@ -18,0 +18,0 @@ const version = await getChromeVersion(includeChromium); |
@@ -44,2 +44,10 @@ const chai = require('chai'); | ||
describe('extractChromiumVersionNumer from Chromium 105.0.5195.102 built on Debian 11.4, running on Debian 11.5', function() { | ||
it('should return "105.0.5195.102"', function() { | ||
const versionString = 'Chromium 105.0.5195.102 built on Debian 11.4, running on Debian 11.5'; | ||
const versionNumber = extractChromeVersionNumer(versionString); | ||
expect(versionNumber).to.equal('105.0.5195.102'); | ||
}); | ||
}); | ||
describe('extractChromiumVersionNumer from Chromium 90.0.4430.212 Fedora Project', function() { | ||
@@ -46,0 +54,0 @@ it('should return "90.0.4430.212"', function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32778
665