[REF] initial prototype of owl 2

This commit is contained in:
Géry Debongnie
2020-11-26 16:45:25 +01:00
parent 4e3b7c74da
commit 7ac20f4fc2
187 changed files with 29162 additions and 32486 deletions
+25
View File
@@ -0,0 +1,25 @@
import { text } from "../../src/blockdom";
import { Component, mount, xml } from "../../src/index";
import { makeTestFixture, snapshotEverything } from "../helpers";
snapshotEverything();
let fixture: HTMLElement;
beforeEach(() => {
fixture = makeTestFixture();
});
describe("t-call-block", () => {
test("simple t-call-block with static text", async () => {
class Test extends Component {
static template = xml`<div><t t-call-block="myBlock()"/></div>`;
myBlock() {
return text("hello");
}
}
await mount(Test, fixture);
expect(fixture.innerHTML).toBe("<div>hello</div>");
});
});