Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/crossref/chapters.test.ts
12921 views
1
/*
2
* chapters.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*/
6
7
import { ensureFileRegexMatches, ensureHtmlElements } from "../../verify.ts";
8
import { testRender } from "../render/render.ts";
9
import { crossref } from "./utils.ts";
10
11
const chaptersQmd = crossref("chapters.qmd", "html");
12
testRender(chaptersQmd.input, "html", false, [
13
ensureHtmlElements(chaptersQmd.output.outputPath, [
14
"div#fig-elephant > figure > figcaption.quarto-float-fig.quarto-float-caption",
15
]),
16
ensureFileRegexMatches(chaptersQmd.output.outputPath, [
17
/Figure 1.1/,
18
/Figure 1.1: Elephant/,
19
], [
20
/\?@fig-/,
21
]),
22
]);
23
24