MCPcopy
hub / github.com/codeceptjs/CodeceptJS / deserializeTest

Function deserializeTest

lib/mocha/test.js:73–88  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

71}
72
73function deserializeTest(test) {
74 test = Object.assign(
75 createTest(test.title || '', () => {}),
76 test,
77 )
78 test.parent = Object.assign(new Suite(test.parent?.title || 'Suite'), test.parent)
79 enhanceMochaSuite(test.parent)
80 if (test.steps) test.steps = test.steps.map(step => Object.assign(new Step(step.title), step))
81
82 // Restore the custom fullTitle function to maintain consistency with original test
83 if (test.parent) {
84 test.fullTitle = () => `${test.parent.title}: ${test.title}`
85 }
86
87 return test
88}
89
90function serializeTest(test, error = null) {
91 // test = { ...test }

Callers 3

_listenWorkerEventsMethod · 0.90
_finishRunMethod · 0.90
cloneTestFunction · 0.85

Calls 2

enhanceMochaSuiteFunction · 0.90
createTestFunction · 0.85

Tested by

no test coverage detected