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

Function parseFile

lib/command/gherkin/snippets.js:90–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 const parseFile = file => {
91 const ast = parser.parse(fs.readFileSync(file).toString())
92 for (const child of ast.feature.children) {
93 if (child.scenario.keyword === 'Scenario Outline') continue // skip scenario outline
94 parseSteps(child.scenario.steps)
95 .map(step => {
96 return Object.assign(step, { file: file.replace(store.codeceptDir, '').slice(1) })
97 })
98 .map(step => newSteps.set(`${step.type}(${step})`, step))
99 }
100 }
101
102 files.forEach(file => parseFile(file))
103

Callers 1

snippets.jsFile · 0.85

Calls 2

parseStepsFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected