har-to-k6
Version:
Convert LI-HAR to k6 script
16 lines (13 loc) • 340 B
JavaScript
const bundle = require('./bundle')
const stage = require('./stage')
// Bundle a constructed index
// Stages to a temporary directory then bundles
async function constructed(index, expose) {
const [path, cleanup] = await stage(index)
try {
return bundle(path, expose)
} finally {
cleanup()
}
}
module.exports = constructed