// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`attributes class and t-attf-class with ternary operation 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = 'hello ' + (context['value']?'world':'');
    let c2 = [], p2 = {key:2,attrs:{class: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes dynamic attribute falsy variable  1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = context['value'];
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes dynamic attribute with a dash 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = context['id'];
    let c2 = [], p2 = {key:2,attrs:{\\"data-action-id\\": _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes dynamic attributes 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = 'bar';
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes dynamic formatted attributes with a dash 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = \`Some text \${context['id']}\`;
    let c2 = [], p2 = {key:2,attrs:{\\"aria-label\\": _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes fixed variable 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = context['value'];
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes format expression 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = (context['value']+37);
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes format expression, other format 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = (context['value']+37);
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes format literal 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = \`bar\`;
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes format multiple 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = \`a \${context['value1']} is \${context['value2']} of \${context['value3']} ]\`;
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes format value 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = \`b\${context['value']}r\`;
    let c2 = [], p2 = {key:2,attrs:{foo: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes from object variables set previously 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = {a:'b'};
    let _3 = utils.toObj(_2.a);
    let c4 = [], p4 = {key:4,class:_3};
    var vn4 = h('span', p4, c4);
    c1.push(vn4);
    return vn1;
}"
`;

exports[`attributes from variables set previously 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 'def';
    let _3 = utils.toObj(_2);
    let c4 = [], p4 = {key:4,class:_3};
    var vn4 = h('span', p4, c4);
    c1.push(vn4);
    return vn1;
}"
`;

exports[`attributes object 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = context['value'];
    let c2 = [], p2 = {key:2,attrs:{}};
    if (_1 instanceof Array) {
        p2.attrs[_1[0]] = _1[1];
    } else {
        for (let key in _1) {
            p2.attrs[key] = _1[key];
        }
    }
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes static attributes 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = 'a';
    var _2 = 'b';
    var _3 = 'c';
    let c4 = [], p4 = {key:4,attrs:{foo: _1,bar: _2,baz: _3}};
    var vn4 = h('div', p4, c4);
    return vn4;
}"
`;

exports[`attributes static attributes on void elements 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = '/test.jpg';
    var _2 = 'Test';
    let c3 = [], p3 = {key:3,attrs:{src: _1,alt: _2}};
    var vn3 = h('img', p3, c3);
    return vn3;
}"
`;

exports[`attributes static attributes with dashes 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = 'Close';
    let c2 = [], p2 = {key:2,attrs:{\\"aria-label\\": _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes t-att-class and class should combine together 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let _2 = {'hello':true};
    Object.assign(_2, utils.toObj(context['value']))
    let c3 = [], p3 = {key:3,class:_2};
    var vn3 = h('div', p3, c3);
    return vn3;
}"
`;

exports[`attributes t-att-class with object 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let _2 = {'static':true};
    Object.assign(_2, utils.toObj({a:context['b'],c:context['d'],e:context['f']}))
    let c3 = [], p3 = {key:3,class:_2};
    var vn3 = h('div', p3, c3);
    return vn3;
}"
`;

exports[`attributes t-attf-class should combine with class 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = 'hello ' + \`world\`;
    let c2 = [], p2 = {key:2,attrs:{class: _1}};
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes tuple literal 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = ['foo','bar'];
    let c2 = [], p2 = {key:2,attrs:{}};
    if (_1 instanceof Array) {
        p2.attrs[_1[0]] = _1[1];
    } else {
        for (let key in _1) {
            p2.attrs[key] = _1[key];
        }
    }
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`attributes tuple variable 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = context['value'];
    let c2 = [], p2 = {key:2,attrs:{}};
    if (_1 instanceof Array) {
        p2.attrs[_1[0]] = _1[1];
    } else {
        for (let key in _1) {
            p2.attrs[key] = _1[key];
        }
    }
    var vn2 = h('div', p2, c2);
    return vn2;
}"
`;

exports[`debugging t-debug 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    debugger;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (true) {
        debugger;
        let c2 = [], p2 = {key:2};
        var vn2 = h('span', p2, c2);
        c1.push(vn2);
        c2.push({text: \`hey\`});
    }
    return vn1;
}"
`;

exports[`debugging t-log 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 42;
    console.log(_2+3)
    return vn1;
}"
`;

exports[`foreach does not pollute the rendering context 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = [1];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.item_first = i1 === 0;
        context.item_last = i1 === _length3 - 1;
        context.item_index = i1;
        context.item = _3[i1];
        context.item_value = _4[i1];
        var _5 = context['item'];
        if (_5 || _5 === 0) {
            c1.push({text: _5});
        }
    }
    return vn1;
}"
`;

exports[`foreach iterate on items (on a element node) 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = [1,2];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.item_first = i1 === 0;
        context.item_last = i1 === _length3 - 1;
        context.item_index = i1;
        context.item = _3[i1];
        context.item_value = _4[i1];
        const nodeKey5 = context['item'];
        let c6 = [], p6 = {key:nodeKey5};
        var vn6 = h('span', p6, c6);
        c1.push(vn6);
        var _7 = context['item'];
        if (_7 || _7 === 0) {
            c6.push({text: _7});
        }
    }
    return vn1;
}"
`;

exports[`foreach iterate on items 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = [3,2,1];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.item_first = i1 === 0;
        context.item_last = i1 === _length3 - 1;
        context.item_index = i1;
        context.item = _3[i1];
        context.item_value = _4[i1];
        c1.push({text: \` [\`});
        var _5 = context['item_index'];
        if (_5 || _5 === 0) {
            c1.push({text: _5});
        }
        c1.push({text: \`: \`});
        var _6 = context['item'];
        if (_6 || _6 === 0) {
            c1.push({text: _6});
        }
        c1.push({text: \` \`});
        var _7 = context['item_value'];
        if (_7 || _7 === 0) {
            c1.push({text: _7});
        }
        c1.push({text: \`] \`});
    }
    return vn1;
}"
`;

exports[`foreach iterate, dict param 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['value'];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.item_first = i1 === 0;
        context.item_last = i1 === _length3 - 1;
        context.item_index = i1;
        context.item = _3[i1];
        context.item_value = _4[i1];
        c1.push({text: \` [\`});
        var _5 = context['item_index'];
        if (_5 || _5 === 0) {
            c1.push({text: _5});
        }
        c1.push({text: \`: \`});
        var _6 = context['item'];
        if (_6 || _6 === 0) {
            c1.push({text: _6});
        }
        c1.push({text: \` \`});
        var _7 = context['item_value'];
        if (_7 || _7 === 0) {
            c1.push({text: _7});
        }
        c1.push({text: \`] \`});
    }
    return vn1;
}"
`;

exports[`foreach iterate, position 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = Array(5);
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.elem_first = i1 === 0;
        context.elem_last = i1 === _length3 - 1;
        context.elem_index = i1;
        context.elem = _3[i1];
        context.elem_value = _4[i1];
        c1.push({text: \` -\`});
        if (context['elem_first']) {
            c1.push({text: \` first\`});
        }
        if (context['elem_last']) {
            c1.push({text: \` last\`});
        }
        c1.push({text: \` (\`});
        var _5 = context['elem_index'];
        if (_5 || _5 === 0) {
            c1.push({text: _5});
        }
        c1.push({text: \`) \`});
    }
    return vn1;
}"
`;

exports[`foreach t-foreach in t-forach 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['numbers'];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.number_first = i1 === 0;
        context.number_last = i1 === _length3 - 1;
        context.number_index = i1;
        context.number = _3[i1];
        context.number_value = _4[i1];
        var _5 = context['letters'];
        if (!_5) { throw new Error('QWeb error: Invalid loop expression')}
        var _6 = _7 = _5;
        if (!(_5 instanceof Array)) {
            _6 = Object.keys(_5);
            _7 = Object.values(_5);
        }
        var _length6 = _6.length;
        for (let i2 = 0; i2 < _length6; i2++) {
            context.letter_first = i2 === 0;
            context.letter_last = i2 === _length6 - 1;
            context.letter_index = i2;
            context.letter = _6[i2];
            context.letter_value = _7[i2];
            c1.push({text: \` [\`});
            var _8 = context['number'];
            if (_8 || _8 === 0) {
                c1.push({text: _8});
            }
            var _9 = context['letter'];
            if (_9 || _9 === 0) {
                c1.push({text: _9});
            }
            c1.push({text: \`] \`});
        }
    }
    return vn1;
}"
`;

exports[`foreach warn if no key in some case 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = [1,2];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.item_first = i1 === 0;
        context.item_last = i1 === _length3 - 1;
        context.item_index = i1;
        context.item = _3[i1];
        context.item_value = _4[i1];
        let c5 = [], p5 = {key:5};
        var vn5 = h('span', p5, c5);
        c1.push(vn5);
        var _6 = context['item'];
        if (_6 || _6 === 0) {
            c5.push({text: _6});
        }
    }
    return vn1;
}"
`;

exports[`loading templates can initialize qweb with a string 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    c1.push({text: \`jupiler\`});
    return vn1;
}"
`;

exports[`loading templates can load a few templates from a xml string 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('ul', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('li', p2, c2);
    c1.push(vn2);
    c2.push({text: \`ok\`});
    let c3 = [], p3 = {key:3};
    var vn3 = h('li', p3, c3);
    c1.push(vn3);
    c3.push({text: \`foo\`});
    return vn1;
}"
`;

exports[`misc global 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = [4,5,6];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.value_first = i1 === 0;
        context.value_last = i1 === _length3 - 1;
        context.value_index = i1;
        context.value = _3[i1];
        context.value_value = _4[i1];
        let c5 = [], p5 = {key:5};
        var vn5 = h('span', p5, c5);
        c1.push(vn5);
        var _6 = context['value'];
        if (_6 || _6 === 0) {
            c5.push({text: _6});
        }
        {
            let _11 = 'bbb';
            var _13 = 'agüero';
            let c14 = [], p14 = {key:14,attrs:{\\"falló\\": _13}};
            var vn14 = h('año', p14, c14);
            c1.push(vn14);
            {
                let _15 = 'aaa';
                let c16 = [], p16 = {key:16};
                var vn16 = h('span', p16, c16);
                c14.push(vn16);
                if (_15 || _15 === 0) {
                    c16.push({text: _15});
                } else {
                    c16.push({text: \`foo default\`});
                }
            }
            let c17 = [], p17 = {key:17};
            var vn17 = h('span', p17, c17);
            c14.push(vn17);
            var _18 = context['foo'];
            if (_18 || _18 === 0) {
                c17.push({text: _18});
            } else {
                c17.push({text: \`foo default\`});
            }
            var _19 = 'bbb';
            let c20 = [], p20 = {key:20};
            var vn20 = h('span', p20, c20);
            c14.push(vn20);
            if (_19 || _19 === 0) {
                c20.push({text: _19});
            } else {
                c20.push({text: \`foo default\`});
            }
        }
    }
    let c21 = [], p21 = {key:21};
    var vn21 = h('div', p21, c21);
    c1.push(vn21);
    var _22 = context['toto'];
    if (_22 || _22 === 0) {
        c21.push(...utils.htmlToVDOM(_22));
    } else {
        c21.push({text: \`toto default\`});
    }
    return vn1;
}"
`;

exports[`properly support svg add proper namespace to g tags 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('g', p1, c1);
    var _2 = '50';
    var _3 = '50';
    var _4 = '4';
    var _5 = 'green';
    var _6 = '1';
    var _7 = 'yellow';
    let c8 = [], p8 = {key:8,attrs:{cx: _2,cy: _3,r: _4,stroke: _5,\\"stroke-width\\": _6,fill: _7}};
    var vn8 = h('circle', p8, c8);
    c1.push(vn8);
    c1.push({text: \` \`});
    utils.addNameSpace(vn1);
    return vn1;
}"
`;

exports[`properly support svg add proper namespace to svg 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    var _1 = '100px';
    var _2 = '90px';
    let c3 = [], p3 = {key:3,attrs:{width: _1,height: _2}};
    var vn3 = h('svg', p3, c3);
    var _4 = '50';
    var _5 = '50';
    var _6 = '4';
    var _7 = 'green';
    var _8 = '1';
    var _9 = 'yellow';
    let c10 = [], p10 = {key:10,attrs:{cx: _4,cy: _5,r: _6,stroke: _7,\\"stroke-width\\": _8,fill: _9}};
    var vn10 = h('circle', p10, c10);
    c3.push(vn10);
    c3.push({text: \` \`});
    utils.addNameSpace(vn3);
    return vn3;
}"
`;

exports[`special cases for some boolean html attributes/properties input type= checkbox, with t-att-checked 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    var _1 = 'checkbox';
    var _2 = context['flag'];
    let c3 = [], p3 = {key:3,attrs:{type: _1,checked: _2},props:{checked: _2}};
    var vn3 = h('input', p3, c3);
    return vn3;
}"
`;

exports[`special cases for some boolean html attributes/properties various boolean html attributes 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 'checkbox';
    var _3 = 'checked';
    let c4 = [], p4 = {key:4,attrs:{type: _2,checked: _3},props:{checked: _3}};
    var vn4 = h('input', p4, c4);
    c1.push(vn4);
    var _5 = 'checked';
    let c6 = [], p6 = {key:6,attrs:{checked: _5}};
    var vn6 = h('input', p6, c6);
    c1.push(vn6);
    var _7 = 'checked';
    let c8 = [], p8 = {key:8,attrs:{checked: _7}};
    var vn8 = h('div', p8, c8);
    c1.push(vn8);
    var _9 = 'selected';
    let c10 = [], p10 = {key:10,attrs:{selected: _9}};
    var vn10 = h('div', p10, c10);
    c1.push(vn10);
    var _11 = 'selected';
    var _12 = '1';
    let c13 = [], p13 = {key:13,attrs:{selected: _11,other: _12},props:{selected: _11}};
    var vn13 = h('option', p13, c13);
    c1.push(vn13);
    var _14 = 'readonly';
    let c15 = [], p15 = {key:15,attrs:{readonly: _14},props:{readonly: _14}};
    var vn15 = h('input', p15, c15);
    c1.push(vn15);
    var _16 = 'disabled';
    let c17 = [], p17 = {key:17,attrs:{disabled: _16},props:{disabled: _16}};
    var vn17 = h('button', p17, c17);
    c1.push(vn17);
    return vn1;
}"
`;

exports[`static templates div with a span child node 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`word\`});
    return vn1;
}"
`;

exports[`static templates div with a text node 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    c1.push({text: \`word\`});
    return vn1;
}"
`;

exports[`static templates empty div 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    return vn1;
}"
`;

exports[`static templates properly handle comments 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    c1.push({text: \`hello \`});
    c1.push(h('!', \` comment\`));
    c1.push({text: \`owl\`});
    return vn1;
}"
`;

exports[`static templates simple dynamic value 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    var _1 = context['text'];
    if (_1 || _1 === 0) {
        var vn2 = {text: _1};
        result = vn2
    }
    return result;
}"
`;

exports[`static templates simple string 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    var vn1 = {text: \`hello vdom\`};
    result = vn1;
    return result;
}"
`;

exports[`static templates simple string, with some dynamic value 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    var vn1 = {text: \`hello \`};
    result = vn1;
    var _2 = context['text'];
    if (_2 || _2 === 0) {
        vn1.text += _2;
    }
    return result;
}"
`;

exports[`t-call (template calling basic caller 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    result = vn1;
    c1.push({text: \`ok\`});
    return result;
}"
`;

exports[`t-call (template calling call with several sub nodes on same line 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c5 = [], p5 = {key:5};
    var vn5 = h('div', p5, c5);
    c1.push(vn5);
    let c6 = [], p6 = {key:6};
    var vn6 = h('span', p6, c6);
    c5.push(vn6);
    c6.push({text: \`hey\`});
    c5.push({text: \` \`});
    let c7 = [], p7 = {key:7};
    var vn7 = h('span', p7, c7);
    c5.push(vn7);
    c7.push({text: \`yay\`});
    return vn1;
}"
`;

exports[`t-call (template calling inherit context 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 1;
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-call (template calling recursive template, part 1 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`hey\`});
    if (false) {
        this.recursiveFns['__3'].call(this, context, Object.assign({}, extra, {parentNode: c1, fiber: {vars: {}, scope}}));
    }
    return vn1;
}"
`;

exports[`t-call (template calling recursive template, part 1 2`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = extra.parentNode;
        Object.assign(context, extra.fiber.scope);
    let c5 = [], p5 = {key:5};
    var vn5 = h('div', p5, c5);
    c1.push(vn5);
    let c6 = [], p6 = {key:6};
    var vn6 = h('span', p6, c6);
    c5.push(vn6);
    c6.push({text: \`hey\`});
    if (false) {
        this.recursiveFns['__3'].call(this, context, Object.assign({}, extra, {parentNode: c5, fiber: {vars: {}, scope}}));
    }
}"
`;

exports[`t-call (template calling recursive template, part 2 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    context = Object.create(context);
    const scope = Object.create(null);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    {
        let _2 = context['root'];
        let c3 = [], p3 = {key:3};
        var vn3 = h('div', p3, c3);
        c1.push(vn3);
        let c4 = [], p4 = {key:4};
        var vn4 = h('p', p4, c4);
        c3.push(vn4);
        var _5 = _2.val;
        if (_5 || _5 === 0) {
            c4.push({text: _5});
        }
        var _6 = _2.children||[];
        if (!_6) { throw new Error('QWeb error: Invalid loop expression')}
        var _7 = _8 = _6;
        if (!(_6 instanceof Array)) {
            _7 = Object.keys(_6);
            _8 = Object.values(_6);
        }
        var _length7 = _7.length;
        for (let i1 = 0; i1 < _length7; i1++) {
            context.subtree_first = i1 === 0;
            scope.subtree_first = context.subtree_first;
            context.subtree_last = i1 === _length7 - 1;
            scope.subtree_last = context.subtree_last;
            context.subtree_index = i1;
            scope.subtree_index = context.subtree_index;
            context.subtree = _7[i1];
            scope.subtree = context.subtree;
            context.subtree_value = _8[i1];
            scope.subtree_value = context.subtree_value;
            this.recursiveFns['__10'].call(this, context, Object.assign({}, extra, {parentNode: c3, fiber: {vars: {_v0: context['subtree']}, scope}}));
        }
    }
    return vn1;
}"
`;

exports[`t-call (template calling recursive template, part 2 2`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    context = Object.create(context);
    const scope = Object.create(null);
    var h = this.h;
    let c3 = extra.parentNode;
    let _v0 = extra.fiber.vars._v0
        Object.assign(context, extra.fiber.scope);
    let c12 = [], p12 = {key:12};
    var vn12 = h('div', p12, c12);
    c3.push(vn12);
    let c13 = [], p13 = {key:13};
    var vn13 = h('p', p13, c13);
    c12.push(vn13);
    var _14 = _v0.val;
    if (_14 || _14 === 0) {
        c13.push({text: _14});
    }
    var _15 = _v0.children||[];
    if (!_15) { throw new Error('QWeb error: Invalid loop expression')}
    var _16 = _17 = _15;
    if (!(_15 instanceof Array)) {
        _16 = Object.keys(_15);
        _17 = Object.values(_15);
    }
    var _length16 = _16.length;
    for (let i1 = 0; i1 < _length16; i1++) {
        context.subtree_first = i1 === 0;
        scope.subtree_first = context.subtree_first;
        context.subtree_last = i1 === _length16 - 1;
        scope.subtree_last = context.subtree_last;
        context.subtree_index = i1;
        scope.subtree_index = context.subtree_index;
        context.subtree = _16[i1];
        scope.subtree = context.subtree;
        context.subtree_value = _17[i1];
        scope.subtree_value = context.subtree_value;
        this.recursiveFns['__10'].call(this, context, Object.assign({}, extra, {parentNode: c12, fiber: {vars: {_v0: context['subtree']}, scope}}));
    }
}"
`;

exports[`t-call (template calling recursive template, part 3 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    context = Object.create(context);
    const scope = Object.create(null);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    {
        let _2 = context['root'];
        let c3 = [], p3 = {key:3};
        var vn3 = h('div', p3, c3);
        c1.push(vn3);
        let c4 = [], p4 = {key:4};
        var vn4 = h('p', p4, c4);
        c3.push(vn4);
        var _5 = _2.val;
        if (_5 || _5 === 0) {
            c4.push({text: _5});
        }
        var _6 = _2.children||[];
        if (!_6) { throw new Error('QWeb error: Invalid loop expression')}
        var _7 = _8 = _6;
        if (!(_6 instanceof Array)) {
            _7 = Object.keys(_6);
            _8 = Object.values(_6);
        }
        var _length7 = _7.length;
        for (let i1 = 0; i1 < _length7; i1++) {
            context.subtree_first = i1 === 0;
            scope.subtree_first = context.subtree_first;
            context.subtree_last = i1 === _length7 - 1;
            scope.subtree_last = context.subtree_last;
            context.subtree_index = i1;
            scope.subtree_index = context.subtree_index;
            context.subtree = _7[i1];
            scope.subtree = context.subtree;
            context.subtree_value = _8[i1];
            scope.subtree_value = context.subtree_value;
            this.recursiveFns['__10'].call(this, context, Object.assign({}, extra, {parentNode: c3, fiber: {vars: {_v0: context['subtree']}, scope}}));
        }
    }
    return vn1;
}"
`;

exports[`t-call (template calling recursive template, part 3 2`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    context = Object.create(context);
    const scope = Object.create(null);
    var h = this.h;
    let c3 = extra.parentNode;
    let _v0 = extra.fiber.vars._v0
        Object.assign(context, extra.fiber.scope);
    let c12 = [], p12 = {key:12};
    var vn12 = h('div', p12, c12);
    c3.push(vn12);
    let c13 = [], p13 = {key:13};
    var vn13 = h('p', p13, c13);
    c12.push(vn13);
    var _14 = _v0.val;
    if (_14 || _14 === 0) {
        c13.push({text: _14});
    }
    var _15 = _v0.children||[];
    if (!_15) { throw new Error('QWeb error: Invalid loop expression')}
    var _16 = _17 = _15;
    if (!(_15 instanceof Array)) {
        _16 = Object.keys(_15);
        _17 = Object.values(_15);
    }
    var _length16 = _16.length;
    for (let i1 = 0; i1 < _length16; i1++) {
        context.subtree_first = i1 === 0;
        scope.subtree_first = context.subtree_first;
        context.subtree_last = i1 === _length16 - 1;
        scope.subtree_last = context.subtree_last;
        context.subtree_index = i1;
        scope.subtree_index = context.subtree_index;
        context.subtree = _16[i1];
        scope.subtree = context.subtree;
        context.subtree_value = _17[i1];
        scope.subtree_value = context.subtree_value;
        this.recursiveFns['__10'].call(this, context, Object.assign({}, extra, {parentNode: c12, fiber: {vars: {_v0: context['subtree']}, scope}}));
    }
}"
`;

exports[`t-call (template calling scoped parameters 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    {
        let _2 = 42;
        c1.push({text: \`ok\`});
    }
    var _3 = context['foo'];
    if (_3 || _3 === 0) {
        c1.push({text: _3});
    }
    return vn1;
}"
`;

exports[`t-call (template calling t-call with t-if 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (context['flag']) {
        let c2 = [], p2 = {key:2};
        var vn2 = h('span', p2, c2);
        c1.push(vn2);
        c2.push({text: \`ok\`});
    }
    return vn1;
}"
`;

exports[`t-call (template calling t-call, global templates 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`desk\`});
    return vn1;
}"
`;

exports[`t-call (template calling with unused body 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    let c2 = [], p2 = {key:2};
    var vn2 = h('div', p2, c2);
    result = vn2;
    c2.push({text: \`ok\`});
    return result;
}"
`;

exports[`t-call (template calling with unused setbody 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    {
        let _1 = 3;
        let c2 = [], p2 = {key:2};
        var vn2 = h('div', p2, c2);
        result = vn2;
        c2.push({text: \`ok\`});
    }
    return result;
}"
`;

exports[`t-call (template calling with used body 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    let c2 = [], p2 = {key:2};
    var vn2 = h('h1', p2, c2);
    result = vn2;
    c2.push({text: \`ok\`});
    return result;
}"
`;

exports[`t-call (template calling with used set body 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    {
        let _2 = 'ok';
        if (_2 || _2 === 0) {
            c1.push({text: _2});
        }
    }
    return vn1;
}"
`;

exports[`t-esc escaping on a node 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = 'ok';
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-esc escaping on a node with a body 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = 'ok';
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    } else {
        c1.push({text: \`nope\`});
    }
    return vn1;
}"
`;

exports[`t-esc escaping on a node with a body, as a default 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = context['var'];
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    } else {
        c1.push({text: \`nope\`});
    }
    return vn1;
}"
`;

exports[`t-esc literal 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = 'ok';
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-esc variable 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = context['var'];
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-if boolean value condition elif 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (context['color']=='black') {
        c1.push({text: \`black pearl\`});
    }
    else if (context['color']=='yellow') {
        c1.push({text: \`yellow submarine\`});
    }
    else if (context['color']=='red') {
        c1.push({text: \`red is dead\`});
    }
    else {
        c1.push({text: \`beer\`});
    }
    return vn1;
}"
`;

exports[`t-if boolean value condition else 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`begin\`});
    if (context['condition']) {
        c1.push({text: \`ok\`});
    }
    else {
        c1.push({text: \`ok-else\`});
    }
    let c3 = [], p3 = {key:3};
    var vn3 = h('span', p3, c3);
    c1.push(vn3);
    c3.push({text: \`end\`});
    return vn1;
}"
`;

exports[`t-if boolean value condition false else 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`begin\`});
    if (context['condition']) {
        c1.push({text: \`fail\`});
    }
    else {
        c1.push({text: \`fail-else\`});
    }
    let c3 = [], p3 = {key:3};
    var vn3 = h('span', p3, c3);
    c1.push(vn3);
    c3.push({text: \`end\`});
    return vn1;
}"
`;

exports[`t-if boolean value condition missing 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    if (context['condition']) {
        c1.push({text: \`fail\`});
    }
    return vn1;
}"
`;

exports[`t-if boolean value false condition 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (context['condition']) {
        c1.push({text: \`ok\`});
    }
    return vn1;
}"
`;

exports[`t-if boolean value true condition 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (context['condition']) {
        c1.push({text: \`ok\`});
    }
    return vn1;
}"
`;

exports[`t-if can use some boolean operators in expressions 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (context['cond1']&&context['cond2']) {
        c1.push({text: \`and\`});
    }
    if (context['cond1']&&context['cond3']) {
        c1.push({text: \`nope\`});
    }
    if (context['cond1']||context['cond3']) {
        c1.push({text: \`or\`});
    }
    if (context['cond3']||context['cond4']) {
        c1.push({text: \`nope\`});
    }
    if (context['m']>3) {
        c1.push({text: \`mgt\`});
    }
    if (context['n']>3) {
        c1.push({text: \`ngt\`});
    }
    if (context['m']<3) {
        c1.push({text: \`mlt\`});
    }
    if (context['n']<3) {
        c1.push({text: \`nlt\`});
    }
    return vn1;
}"
`;

exports[`t-if t-esc with t-elif 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (false) {
        c1.push({text: \`abc\`});
    }
    else {
        var _2 = 'x';
        if (_2 || _2 === 0) {
            c1.push({text: _2});
        }
    }
    return vn1;
}"
`;

exports[`t-if t-esc with t-if 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    if (true) {
        var _2 = 'x';
        if (_2 || _2 === 0) {
            c1.push({text: _2});
        }
    }
    return vn1;
}"
`;

exports[`t-if t-set, then t-elif, part 3 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = false;
    var _3 = _2;
    if (_3) {
        let c4 = [], p4 = {key:4};
        var vn4 = h('span', p4, c4);
        c1.push(vn4);
        c4.push({text: \`AAA\`});
    }
        else if (!_3) {
            let c5 = [], p5 = {key:5};
            var vn5 = h('span', p5, c5);
            c1.push(vn5);
            c5.push({text: \`BBB\`});
        }
    return vn1;
}"
`;

exports[`t-if t-set, then t-if 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 'test';
    if (_2) {
        if (_2 || _2 === 0) {
            c1.push({text: _2});
        }
    }
    return vn1;
}"
`;

exports[`t-if t-set, then t-if, part 2 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = true;
    var _3 = _2;
    if (_3) {
        let c4 = [], p4 = {key:4};
        var vn4 = h('span', p4, c4);
        c1.push(vn4);
        c4.push({text: \`COUCOU\`});
    }
    return vn1;
}"
`;

exports[`t-key can use t-key directive on a node 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    const nodeKey1 = context['beer'].id;
    let c2 = [], p2 = {key:nodeKey1};
    var vn2 = h('div', p2, c2);
    var _3 = context['beer'].name;
    if (_3 || _3 === 0) {
        c2.push({text: _3});
    }
    return vn2;
}"
`;

exports[`t-key t-key directive in a list 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('ul', p1, c1);
    var _2 = context['beers'];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.beer_first = i1 === 0;
        context.beer_last = i1 === _length3 - 1;
        context.beer_index = i1;
        context.beer = _3[i1];
        context.beer_value = _4[i1];
        const nodeKey5 = context['beer'].id;
        let c6 = [], p6 = {key:nodeKey5};
        var vn6 = h('li', p6, c6);
        c1.push(vn6);
        var _7 = context['beer'].name;
        if (_7 || _7 === 0) {
            c6.push({text: _7});
        }
    }
    return vn1;
}"
`;

exports[`t-key t-key directive in a list 2`] = `"<ul><li>Chimay Rouge</li></ul>"`;

exports[`t-on can bind event handler 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    extra.handlers['click' + 1] = extra.handlers['click' + 1] || function (e) {const fn = context['add'];if (fn) { fn.call(owner, e); } else { context.add; }};
    p1.on['click'] = extra.handlers['click' + 1];
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on can bind handlers with arguments 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    const handler2 = context['add'] && context['add'].bind(owner, 5);
    p1.on['click'] = function (e) {if (handler2) { handler2(e); } else { context.add(5); }};
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on can bind handlers with empty object (with non empty inner string) 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    const handler2 = context['doSomething'] && context['doSomething'].bind(owner, {});
    p1.on['click'] = function (e) {if (handler2) { handler2(e); } else { context.doSomething({ }); }};
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on can bind handlers with empty object 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    const handler2 = context['doSomething'] && context['doSomething'].bind(owner, {});
    p1.on['click'] = function (e) {if (handler2) { handler2(e); } else { context.doSomething({}); }};
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on can bind handlers with loop variable as argument 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('ul', p1, c1);
    var _2 = ['someval'];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.action_first = i1 === 0;
        context.action_last = i1 === _length3 - 1;
        context.action_index = i1;
        context.action = _3[i1];
        context.action_value = _4[i1];
        const nodeKey5 = context['action_index'];
        let c6 = [], p6 = {key:nodeKey5};
        var vn6 = h('li', p6, c6);
        c1.push(vn6);
        let c7 = [], p7 = {key:nodeKey5,on:{}};
        var vn7 = h('a', p7, c7);
        c6.push(vn7);
        const handler8 = context['activate'] && context['activate'].bind(owner, context['action']);
        p7.on['click'] = function (e) {if (handler8) { handler8(e); } else { context.activate(action); }};
        c7.push({text: \`link\`});
    }
    return vn1;
}"
`;

exports[`t-on can bind handlers with object arguments 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    const handler2 = context['add'] && context['add'].bind(owner, {val:5});
    p1.on['click'] = function (e) {if (handler2) { handler2(e); } else { context.add({val: 5}); }};
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on can bind two event handlers 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    extra.handlers['click' + 1] = extra.handlers['click' + 1] || function (e) {const fn = context['handleClick'];if (fn) { fn.call(owner, e); } else { context.handleClick; }};
    p1.on['click'] = extra.handlers['click' + 1];
    extra.handlers['dblclick' + 1] = extra.handlers['dblclick' + 1] || function (e) {const fn = context['handleDblClick'];if (fn) { fn.call(owner, e); } else { context.handleDblClick; }};
    p1.on['dblclick'] = extra.handlers['dblclick' + 1];
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on handler is bound to proper owner 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    extra.handlers['click' + 1] = extra.handlers['click' + 1] || function (e) {const fn = context['add'];if (fn) { fn.call(owner, e); } else { context.add; }};
    p1.on['click'] = extra.handlers['click' + 1];
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on t-on combined with t-esc 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    extra.handlers['click' + 2] = extra.handlers['click' + 2] || function (e) {const fn = context['onClick'];if (fn) { fn.call(owner, e); } else { context.onClick; }};
    p2.on['click'] = extra.handlers['click' + 2];
    var _3 = context['text'];
    if (_3 || _3 === 0) {
        c2.push({text: _3});
    }
    return vn1;
}"
`;

exports[`t-on t-on combined with t-raw 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    extra.handlers['click' + 2] = extra.handlers['click' + 2] || function (e) {const fn = context['onClick'];if (fn) { fn.call(owner, e); } else { context.onClick; }};
    p2.on['click'] = extra.handlers['click' + 2];
    var _3 = context['html'];
    if (_3 || _3 === 0) {
        c2.push(...utils.htmlToVDOM(_3));
    }
    return vn1;
}"
`;

exports[`t-on t-on with empty handler (only modifiers) 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    p2.on['click'] = function (e) {e.preventDefault();};
    c2.push({text: \`Button\`});
    return vn1;
}"
`;

exports[`t-on t-on with inline statement (function call) 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    const handler2 = context['state.incrementCounter'] && context['state.incrementCounter'].bind(owner, 2);
    p1.on['click'] = function (e) {if (handler2) { handler2(e); } else { context.state.incrementCounter(2); }};
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on t-on with inline statement 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1,on:{}};
    var vn1 = h('button', p1, c1);
    extra.handlers['click' + 1] = extra.handlers['click' + 1] || function (e) {const fn = context['state.counter++'];if (fn) { fn.call(owner, e); } else { context.state.counter++; }};
    p1.on['click'] = extra.handlers['click' + 1];
    c1.push({text: \`Click\`});
    return vn1;
}"
`;

exports[`t-on t-on with prevent and self modifiers (order matters) 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    extra.handlers['click' + 2] = extra.handlers['click' + 2] || function (e) {e.preventDefault();if (e.target !== this.elm) {return}const fn = context['onClick'];if (fn) { fn.call(owner, e); } else { context.onClick; }};
    p2.on['click'] = extra.handlers['click' + 2];
    let c3 = [], p3 = {key:3};
    var vn3 = h('span', p3, c3);
    c2.push(vn3);
    c3.push({text: \`Button\`});
    return vn1;
}"
`;

exports[`t-on t-on with prevent and/or stop modifiers 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    extra.handlers['click' + 2] = extra.handlers['click' + 2] || function (e) {e.preventDefault();const fn = context['onClickPrevented'];if (fn) { fn.call(owner, e); } else { context.onClickPrevented; }};
    p2.on['click'] = extra.handlers['click' + 2];
    c2.push({text: \`Button 1\`});
    let c3 = [], p3 = {key:3,on:{}};
    var vn3 = h('button', p3, c3);
    c1.push(vn3);
    extra.handlers['click' + 3] = extra.handlers['click' + 3] || function (e) {e.stopPropagation();const fn = context['onClickStopped'];if (fn) { fn.call(owner, e); } else { context.onClickStopped; }};
    p3.on['click'] = extra.handlers['click' + 3];
    c3.push({text: \`Button 2\`});
    let c4 = [], p4 = {key:4,on:{}};
    var vn4 = h('button', p4, c4);
    c1.push(vn4);
    extra.handlers['click' + 4] = extra.handlers['click' + 4] || function (e) {e.preventDefault();e.stopPropagation();const fn = context['onClickPreventedAndStopped'];if (fn) { fn.call(owner, e); } else { context.onClickPreventedAndStopped; }};
    p4.on['click'] = extra.handlers['click' + 4];
    c4.push({text: \`Button 3\`});
    return vn1;
}"
`;

exports[`t-on t-on with prevent modifier in t-foreach 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['projects'];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.project_first = i1 === 0;
        context.project_last = i1 === _length3 - 1;
        context.project_index = i1;
        context.project = _3[i1];
        context.project_value = _4[i1];
        const nodeKey5 = context['project'];
        var _6 = '#';
        let c7 = [], p7 = {key:nodeKey5,attrs:{href: _6},on:{}};
        var vn7 = h('a', p7, c7);
        c1.push(vn7);
        const handler8 = context['onEdit'] && context['onEdit'].bind(owner, context['project'].id);
        p7.on['click'] = function (e) {e.preventDefault();if (handler8) { handler8(e); } else { context.onEdit(project.id); }};
        c7.push({text: \` Edit \`});
        var _9 = context['project'].name;
        if (_9 || _9 === 0) {
            c7.push({text: _9});
        }
    }
    return vn1;
}"
`;

exports[`t-on t-on with self and prevent modifiers (order matters) 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    extra.handlers['click' + 2] = extra.handlers['click' + 2] || function (e) {if (e.target !== this.elm) {return}e.preventDefault();const fn = context['onClick'];if (fn) { fn.call(owner, e); } else { context.onClick; }};
    p2.on['click'] = extra.handlers['click' + 2];
    let c3 = [], p3 = {key:3};
    var vn3 = h('span', p3, c3);
    c2.push(vn3);
    c3.push({text: \`Button\`});
    return vn1;
}"
`;

exports[`t-on t-on with self modifier 1`] = `
"function anonymous(context,extra
) {
    let owner = context;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2,on:{}};
    var vn2 = h('button', p2, c2);
    c1.push(vn2);
    extra.handlers['click' + 2] = extra.handlers['click' + 2] || function (e) {const fn = context['onClick'];if (fn) { fn.call(owner, e); } else { context.onClick; }};
    p2.on['click'] = extra.handlers['click' + 2];
    let c3 = [], p3 = {key:3};
    var vn3 = h('span', p3, c3);
    c2.push(vn3);
    c3.push({text: \`Button\`});
    let c4 = [], p4 = {key:4,on:{}};
    var vn4 = h('button', p4, c4);
    c1.push(vn4);
    extra.handlers['click' + 4] = extra.handlers['click' + 4] || function (e) {if (e.target !== this.elm) {return}const fn = context['onClickSelf'];if (fn) { fn.call(owner, e); } else { context.onClickSelf; }};
    p4.on['click'] = extra.handlers['click' + 4];
    let c5 = [], p5 = {key:5};
    var vn5 = h('span', p5, c5);
    c4.push(vn5);
    c5.push({text: \`Button\`});
    return vn1;
}"
`;

exports[`t-raw literal 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = 'ok';
    if (_2 || _2 === 0) {
        c1.push(...utils.htmlToVDOM(_2));
    }
    return vn1;
}"
`;

exports[`t-raw not escaping 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['var'];
    if (_2 || _2 === 0) {
        c1.push(...utils.htmlToVDOM(_2));
    }
    return vn1;
}"
`;

exports[`t-raw t-raw and another sibling node 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`hello\`});
    var _3 = context['var'];
    if (_3 || _3 === 0) {
        c1.push(...utils.htmlToVDOM(_3));
    }
    return vn1;
}"
`;

exports[`t-raw variable 1`] = `
"function anonymous(context,extra
) {
    let utils = this.constructor.utils;
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('span', p1, c1);
    var _2 = context['var'];
    if (_2 || _2 === 0) {
        c1.push(...utils.htmlToVDOM(_2));
    }
    return vn1;
}"
`;

exports[`t-ref can get a dynamic ref on a node 1`] = `
"function anonymous(context,extra
) {
    context.__owl__.refs = context.__owl__.refs || {};
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    const ref3 = \`myspan\${context['id']}\`;
    p2.hook = {
      create: (_, n) => {
        context.__owl__.refs[ref3] = n.elm;
      },
      destroy: () => {
        delete context.__owl__.refs[ref3];
      },
    };
    return vn1;
}"
`;

exports[`t-ref can get a ref on a node 1`] = `
"function anonymous(context,extra
) {
    context.__owl__.refs = context.__owl__.refs || {};
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    const ref3 = \`myspan\`;
    p2.hook = {
      create: (_, n) => {
        context.__owl__.refs[ref3] = n.elm;
      },
      destroy: () => {
        delete context.__owl__.refs[ref3];
      },
    };
    return vn1;
}"
`;

exports[`t-ref refs in a loop 1`] = `
"function anonymous(context,extra
) {
    context.__owl__.refs = context.__owl__.refs || {};
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['items'];
    if (!_2) { throw new Error('QWeb error: Invalid loop expression')}
    var _3 = _4 = _2;
    if (!(_2 instanceof Array)) {
        _3 = Object.keys(_2);
        _4 = Object.values(_2);
    }
    var _length3 = _3.length;
    for (let i1 = 0; i1 < _length3; i1++) {
        context.item_first = i1 === 0;
        context.item_last = i1 === _length3 - 1;
        context.item_index = i1;
        context.item = _3[i1];
        context.item_value = _4[i1];
        const nodeKey5 = context['item'];
        let c6 = [], p6 = {key:nodeKey5};
        var vn6 = h('div', p6, c6);
        c1.push(vn6);
        const ref7 = (context['item']);
        p6.hook = {
          create: (_, n) => {
            context.__owl__.refs[ref7] = n.elm;
          },
          destroy: () => {
            delete context.__owl__.refs[ref7];
          },
        };
        var _8 = context['item'];
        if (_8 || _8 === 0) {
            c6.push({text: _8});
        }
    }
    return vn1;
}"
`;

exports[`t-set evaluate value expression 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 1+2;
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-set evaluate value expression, part 2 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['somevariable']+2;
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-set set from attribute literal 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 'ok';
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-set set from attribute lookup 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['value'];
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-set set from body literal 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    let result;
    var h = this.h;
    var vn1 = {text: \`ok\`};
    result = vn1;
    return result;
}"
`;

exports[`t-set set from body lookup 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['value'];
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-set set from empty body 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    return vn1;
}"
`;

exports[`t-set t-set and t-if 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['value'];
    if (_2==='ok') {
        c1.push({text: \`grimbergen\`});
    }
    return vn1;
}"
`;

exports[`t-set t-set evaluates an expression only once 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = context['value']+' artois';
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`t-set t-set should reuse variable if possible 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    context = Object.create(context);
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 1;
    var _3 = context['list'];
    if (!_3) { throw new Error('QWeb error: Invalid loop expression')}
    var _4 = _5 = _3;
    if (!(_3 instanceof Array)) {
        _4 = Object.keys(_3);
        _5 = Object.values(_3);
    }
    var _length4 = _4.length;
    for (let i1 = 0; i1 < _length4; i1++) {
        context.elem_first = i1 === 0;
        context.elem_last = i1 === _length4 - 1;
        context.elem_index = i1;
        context.elem = _4[i1];
        context.elem_value = _5[i1];
        const nodeKey6 = context['elem_index'];
        let c7 = [], p7 = {key:nodeKey6};
        var vn7 = h('div', p7, c7);
        c1.push(vn7);
        let c8 = [], p8 = {key:nodeKey6};
        var vn8 = h('span', p8, c8);
        c7.push(vn8);
        c8.push({text: \`v\`});
        if (_2 || _2 === 0) {
            c8.push({text: _2});
        }
        _2 = context['elem']
    }
    return vn1;
}"
`;

exports[`t-set value priority 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 1;
    if (_2 || _2 === 0) {
        c1.push({text: _2});
    }
    return vn1;
}"
`;

exports[`translation support can translate node content 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    c1.push({text: \`mot\`});
    return vn1;
}"
`;

exports[`translation support does not translate node content if disabled 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`mot\`});
    let c3 = [], p3 = {key:3};
    var vn3 = h('span', p3, c3);
    c1.push(vn3);
    c3.push({text: \`word\`});
    return vn1;
}"
`;

exports[`translation support some attributes are translated 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    var _2 = 'mot';
    let c3 = [], p3 = {key:3,attrs:{label: _2}};
    var vn3 = h('p', p3, c3);
    c1.push(vn3);
    c3.push({text: \`mot\`});
    var _4 = 'mot';
    let c5 = [], p5 = {key:5,attrs:{title: _4}};
    var vn5 = h('p', p5, c5);
    c1.push(vn5);
    c5.push({text: \`mot\`});
    var _6 = 'mot';
    let c7 = [], p7 = {key:7,attrs:{placeholder: _6}};
    var vn7 = h('p', p7, c7);
    c1.push(vn7);
    c7.push({text: \`mot\`});
    var _8 = 'mot';
    let c9 = [], p9 = {key:9,attrs:{alt: _8}};
    var vn9 = h('p', p9, c9);
    c1.push(vn9);
    c9.push({text: \`mot\`});
    var _10 = 'word';
    let c11 = [], p11 = {key:11,attrs:{something: _10}};
    var vn11 = h('p', p11, c11);
    c1.push(vn11);
    c11.push({text: \`mot\`});
    return vn1;
}"
`;

exports[`whitespace handling consecutives whitespaces are condensed into a single space 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    c1.push({text: \` abc \`});
    return vn1;
}"
`;

exports[`whitespace handling nothing is done in pre tags 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('pre', p1, c1);
    c1.push({text: \`  \`});
    return vn1;
}"
`;

exports[`whitespace handling nothing is done in pre tags 2`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('pre', p1, c1);
    c1.push({text: \`
        some text
      \`});
    return vn1;
}"
`;

exports[`whitespace handling nothing is done in pre tags 3`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('pre', p1, c1);
    c1.push({text: \`
        
      \`});
    return vn1;
}"
`;

exports[`whitespace handling white space only text nodes are condensed into a single space 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    c1.push({text: \` \`});
    return vn1;
}"
`;

exports[`whitespace handling whitespace only text nodes with newlines are removed 1`] = `
"function anonymous(context,extra
) {
    let sibling = null;
    var h = this.h;
    let c1 = [], p1 = {key:1};
    var vn1 = h('div', p1, c1);
    let c2 = [], p2 = {key:2};
    var vn2 = h('span', p2, c2);
    c1.push(vn2);
    c2.push({text: \`abc\`});
    return vn1;
}"
`;
