har-to-k6
Version:
Convert LI-HAR to k6 script
22 lines (18 loc) • 390 B
JavaScript
const { PostSpecies } = require('../../enum')
function entry(spec) {
spec.state.expanded = expanded(spec)
}
/*
* Render in expanded group
*
* Any of:
* - Has body.
* - Has check.
* - Has variable extraction.
*/
function expanded(spec) {
return (
spec.request.state.post.species !== PostSpecies.Empty || spec.checks.size || spec.variables.size
)
}
module.exports = entry