import { render, Host } from "@cerxes/csx";
import { testContainer } from "../utils/test-container";
describe("Basic render-options", () => {
test("opts.host", async () => {
let startElement = render(
);
let container = testContainer([startElement]);
render(Contents, {host: startElement});
expect(container.innerHTML).toBe(
`Contents
`
);
});
test("opts.vnode", async () => {
let container = testContainer();
let initialVSpec = (
Initial title
);
let updatedVSpec = (
Updated title
);
render(initialVSpec, {host: container});
// Initial
expect(container.innerHTML).toBe(
`Initial title
`
);
render(updatedVSpec, {host: container, old: initialVSpec});
// Updated
expect(container.innerHTML).toBe(
`Updated title
`
);
});
});