honkit
Version:
HonKit is building beautiful books using Markdown.
25 lines (24 loc) • 911 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const summaryPart_1 = __importDefault(require("../summaryPart"));
describe("SummaryPart", () => {
describe("createChildLevel", () => {
test("must create the right level", () => {
const article = summaryPart_1.default.create({}, "1");
expect(article.createChildLevel()).toBe("1.1");
});
test("must create the right level when has articles", () => {
const article = summaryPart_1.default.create({
articles: [
{
title: "Test",
},
],
}, "1");
expect(article.createChildLevel()).toBe("1.2");
});
});
});