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

Function formatTimestamp

lib/plugin/screencast.js:251–258  ·  view source on GitHub ↗
(timestampInMs)

Source from the content-addressed store, hash-verified

249}
250
251function formatTimestamp(timestampInMs) {
252 const date = new Date(0, 0, 0, 0, 0, 0, timestampInMs)
253 const hours = date.getHours()
254 const minutes = date.getMinutes()
255 const seconds = date.getSeconds()
256 const ms = timestampInMs - (hours * 3600000 + minutes * 60000 + seconds * 1000)
257 return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')},${ms.toString().padStart(3, '0')}`
258}
259
260function stepTitle(step) {
261 let title = `${step.actor}.${step.title}(${step.args ? step.args.join(',') : ''})`

Callers 1

wireScreencastFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected