organism-react-d3-piechart
Version:
36 lines (33 loc) • 1.13 kB
JavaScript
import _regeneratorRuntime from "reshow-runtime/es/helpers/regeneratorRuntime";
import _asyncToGenerator from "reshow-runtime/es/helpers/asyncToGenerator";
var _PieChart;
import { expect } from "chai";
import { jsdom, render, waitFor } from "reshow-unit";
import PieChart from "../PieChart.mjs";
import { jsx as _jsx } from "react/jsx-runtime";
describe("Test PieChart", function () {
beforeEach(function () {
jsdom(null, {
runScripts: "dangerously",
resources: "usable"
});
});
it("basic test", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var wrap;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
wrap = render(_PieChart || (_PieChart = /*#__PURE__*/_jsx(PieChart, {})));
waitFor(function () {
var html = wrap.html();
expect(html).to.have.string("svg");
});
case 2:
case "end":
return _context.stop();
}
}
}, _callee);
})));
});