UNPKG

json-reporter

Version:

Common plugin for testplane and hermione which is intended to aggregate the results of tests running

20 lines (15 loc) 463 B
'use strict'; const path = require('path'); exports.getRelativePath = (fullPath) => { return fullPath ? path.relative(process.cwd(), fullPath) : null; }; exports.getSuitePath = getSuitePath; function getSuitePath(suite) { return (!suite || suite.root) ? [] : getSuitePath(suite.parent).concat(suite.title); } exports.getFilePath = getFilePath; function getFilePath(test) { return test && (test.file || getFilePath(test.parent)); }