mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`props validation props are validated in dev mode (code snapshot) 1`] = `
|
|
"function anonymous(context, extra
|
|
) {
|
|
// Template name: \\"App\\"
|
|
let utils = this.constructor.utils;
|
|
let QWeb = this.constructor;
|
|
let parent = context;
|
|
let owner = context;
|
|
var h = this.h;
|
|
let c1 = [], p1 = {key:1};
|
|
var vn1 = h('div', p1, c1);
|
|
//COMPONENT
|
|
let k3 = \`__4__\`;
|
|
let w2 = k3 in parent.__owl__.cmap ? parent.__owl__.children[parent.__owl__.cmap[k3]] : false;
|
|
let props2 = {message:1};
|
|
if (w2 && w2.__owl__.currentFiber && !w2.__owl__.vnode) {
|
|
w2.destroy();
|
|
w2 = false;
|
|
}
|
|
if (w2) {
|
|
w2.__updateProps(props2, extra.fiber, undefined, undefined);
|
|
let pvnode = w2.__owl__.pvnode;
|
|
c1.push(pvnode);
|
|
} else {
|
|
let componentKey2 = \`Child\`;
|
|
let W2 = context.constructor.components[componentKey2] || QWeb.components[componentKey2]|| context['Child'];
|
|
if (!W2) {throw new Error('Cannot find the definition of component \\"' + componentKey2 + '\\"')}
|
|
w2 = new W2(parent, props2);
|
|
parent.__owl__.cmap[k3] = w2.__owl__.id;
|
|
let fiber = w2.__prepare(extra.fiber, undefined, undefined, () => { const vnode = fiber.vnode; pvnode.sel = vnode.sel; });
|
|
let pvnode = h('dummy', {key: k3, hook: {remove() {},destroy(vn) {w2.destroy();}}});
|
|
c1.push(pvnode);
|
|
w2.__owl__.pvnode = pvnode;
|
|
}
|
|
w2.__owl__.parentLastFiberId = extra.fiber.id;
|
|
return vn1;
|
|
}"
|
|
`;
|