MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / parsePlaywrightBrowsers

Function parsePlaywrightBrowsers

lib/command/info.js:13–22  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

11const playwrightBrowserRegex = /(?:([\d.]+)\s+\(playwright\s+(chromium|firefox|webkit)\s)|(?:browser:\s*(chromium|firefox|webkit)\s+version\s+([\d.]+))/gi
12
13function parsePlaywrightBrowsers(output) {
14 const versions = []
15 const matches = [...output.matchAll(playwrightBrowserRegex)]
16 matches.forEach(match => {
17 const browser = match[2] || match[3]
18 const version = match[1] || match[4]
19 versions.push(`${browser}: ${version}`)
20 })
21 return versions.join(', ')
22}
23
24async function getPlaywrightBrowsers() {
25 try {

Callers 2

info_test.jsFile · 0.90
getPlaywrightBrowsersFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected