UNPKG

jquery-test-runner

Version:

A test runner built by the jQuery team to run QUnit tests in real browsers using Selenium and BrowserStack

21 lines (18 loc) 433 B
export function buildBrowserFromString( str ) { const [ browser, versionOrDevice, os, osVersion ] = str.split( "_" ); // If the version starts with a colon, it's a device if ( versionOrDevice && versionOrDevice.startsWith( ":" ) ) { return { browser, device: versionOrDevice.slice( 1 ), os, os_version: osVersion }; } return { browser, browser_version: versionOrDevice, os, os_version: osVersion }; }