MCPcopy
hub / github.com/cucumber/cucumber-js / parseEnvString

Method parseEnvString

features/support/world.ts:42–54  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

40 public reportServer: FakeReportServer
41
42 parseEnvString(str: string): NodeJS.ProcessEnv {
43 const result: NodeJS.ProcessEnv = {}
44 if (doesHaveValue(str)) {
45 try {
46 Object.assign(result, JSON.parse(str))
47 } catch {
48 for (const pair of str.split(/\s+/).map((keyValue) => keyValue.split('='))) {
49 result[pair[0]] = pair[1]
50 }
51 }
52 }
53 return result
54 }
55
56 async run(
57 executablePath: string,

Callers 1

cli_steps.tsFile · 0.80

Calls 1

doesHaveValueFunction · 0.90

Tested by

no test coverage detected