(test)
| 71 | } |
| 72 | |
| 73 | function 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 | |
| 90 | function serializeTest(test, error = null) { |
| 91 | // test = { ...test } |
no test coverage detected