UNPKG

reshow-build

Version:
20 lines (19 loc) 598 B
// @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>"); }); }); });