spec/helpers/fixture-utils.js
function createRawHtml( createTemplateFn, templateLanguage, elCommentConfig, dataAttributes ) {
    // Construct the HTML string
    var comment = elCommentConfig.noComment ? "" : "<!-- " + elCommentConfig.createContent( dataAttributes ) + " -->",

        insertion = elCommentConfig.among ? comment : "",
        isLeading = ! elCommentConfig.trailing && !elCommentConfig.among,
        isTrailing = elCommentConfig.trailing,

        baseTemplate = createTemplateFn( templateLanguage, insertion );

    return isLeading ? comment + baseTemplate : isTrailing ? baseTemplate + comment : baseTemplate;
}
function createRawHtml( createTemplateFn, templateLanguage, elCommentConfig, dataAttributes ) {
    // Construct the HTML string
    var comment = elCommentConfig.noComment ? "" : "<!-- " + elCommentConfig.createContent( dataAttributes ) + " -->",

        insertion = elCommentConfig.among ? comment : "",
        isLeading = ! elCommentConfig.trailing && !elCommentConfig.among,
        isTrailing = elCommentConfig.trailing,

        baseTemplate = createTemplateFn( templateLanguage, insertion );

    return isLeading ? comment + baseTemplate : isTrailing ? baseTemplate + comment : baseTemplate;
}
Creates a raw HTML string for a template. A comment containing the el configuration can be inserted into it.

By default, the comment is inserted at the beginning of the HTML string.

@param   {Function} createTemplateFn  the function returning the template HTML, except for the el comment. It  must
be possible to pass the el comment as an insertion. Expected signature:
createTemplateFn( templateLanguage, insertion )
@param   {string} templateLanguage    currently supported: "Handlebars", "EJS" (EJS), "ES6". It is up to the template
creation function what to make of it (e.g., can be ignored if there are no
template vars)
@param   {Object} elCommentConfig
@param   {Function} [elCommentConfig.createContent]    a function generating the content of the comment which defines
the el, except for the outer comment tags (not wrapped in
"<!-- ... -->"). Called with the data attributes (as a hash).
Expected signature: createContent( dataAttributes )
@param   {boolean}  [elCommentConfig.noComment=false]  flag: comment should be omitted
@param   {boolean}  [elCommentConfig.trailing=false]   flag: comment should be placed at the end of the HTML
@param   {boolean}  [elCommentConfig.among=false]      flag: comment should be placed inside the HTML
@param   {Object}   [dataAttributes]                   hash containing the data attributes to be set in the comment

@returns {string}