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