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

Function serializeTest

lib/plugin/analyze.js:368–391  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

366}
367
368function serializeTest(test) {
369 if (!test.uid) return
370
371 let testMessage = 'TEST TITLE: ' + test.title
372
373 if (test.suite) {
374 testMessage += '\n SUITE: ' + test.suite.title
375 }
376 if (test.parent) {
377 testMessage += '\n SUITE: ' + test.parent.title
378 }
379
380 if (test.steps?.length) {
381 const failedSteps = test.steps
382 if (failedSteps.length) testMessage += '\n STEP: ' + failedSteps.map(s => s.toCode()).join('; ')
383 }
384
385 const pageInfo = test.notes.find(n => n.type === 'pageInfo')
386 if (pageInfo) {
387 testMessage += '\n PAGE INFO: ' + pageInfo.text
388 }
389
390 return testMessage
391}
392
393function formatResponse(response) {
394 return response

Callers 2

analyze.jsFile · 0.70
printReportFunction · 0.70

Calls 2

toCodeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected