cucumber-html-report
Version:
Convert cucumber json reports to a pretty html report.
23 lines (19 loc) • 434 B
JavaScript
const fs = require('fs')
const path = require('path')
// Shamelessly stolen from stackoverflow..
function mkdirSync (path) {
try {
fs.mkdirSync(path)
} catch (e) {
if (e.code !== 'EEXIST') {
throw e
}
}
}
exports.mkdirpSync = (dirpath) => {
const parts = dirpath.split('/') // path.sep
for (let i = 1; i <= parts.length; i++) {
mkdirSync(path.join.apply(null, parts.slice(0, i)))
}
}