reshow-build
Version:
React super cloneElement and createElement
20 lines (19 loc) • 598 B
JavaScript
// @ts-check
import build from "../index.mjs";
import { expect } from "chai";
import { render } from "reshow-unit";
describe("Test build Empty", function () {
[null, undefined].forEach(function (input) {
it("Test " + input, function () {
var actual = build(input)();
expect(actual).to.be.null;
});
});
[[], "", true, false].forEach(function (input) {
it("Test " + JSON.stringify(input), function () {
var actual = /**@type React.ReactElement*/build(true)();
var wrap = render(actual);
expect(wrap.html()).to.equal("<span></span>");
});
});
});