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

Function buildSrt

lib/plugin/screencast.js:266–276  ·  view source on GitHub ↗
(steps)

Source from the content-addressed store, hash-verified

264}
265
266function buildSrt(steps) {
267 const sorted = Object.values(steps).sort((a, b) => a.startedAt - b.startedAt)
268 let out = ''
269 let index = 1
270 for (const step of sorted) {
271 if (!step.end) continue
272 out += `${index}\n${step.start} --> ${step.end}\n${step.title}\n\n`
273 index++
274 }
275 return out
276}
277
278function ensureArtifactsObject(test) {
279 if (!test.artifacts || Array.isArray(test.artifacts)) test.artifacts = {}

Callers 1

finalizeScreencastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected