Skip to content

Commit

Permalink
test: add rendererElement test
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Jul 12, 2022
1 parent 12b5066 commit d1c79b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/runtime-core/__tests__/rendererElement.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
describe("renderer: element", () => {
let root;

beforeEach(() => {
root = nodeOps.createElement("div");
});

it("should create an element", () => {
render(h("div"), root);
expect(inner(root)).toBe("<div></div>");
});
});
5 changes: 5 additions & 0 deletions packages/runtime-test/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// todo
// 实现 render 的渲染接口
// 实现序列化


0 comments on commit d1c79b0

Please sign in to comment.