all files / blackbird/modules/middleware/ contentType.js

100% Statements 5/5
66.67% Branches 2/3
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8      
const {curry} = require("ramda");
module.exports = curry(function contentType(app, defaultType, conn) {
    return conn.run(app).then(function () {
        const headers = conn.response.headers;
        headers["Content-Type"] = headers["Content-Type"] || defaultType || "text/html";
    });
});