All files parse-input-yaml.js

100% Statements 4/4
100% Branches 2/2
100% Functions 2/2
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 131x           2x 2x 2x        
module.exports = function({
    process,
    fs,
    rawBody,
    jsYaml,
}) {
    return function parseInputYaml(file) {
        const stream = file ? fs.readFile(file) : process.stdin;
        return rawBody(stream, {encoding: 'utf-8'})
            .then(jsYaml.safeLoadAll);
    };
}