Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/crossref/listings.test.ts
12921 views
1
/*
2
* listings.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 listingsQmd = crossref("listings.qmd", "html");
13
testRender(listingsQmd.input, "html", false, [
14
ensureHtmlElements(listingsQmd.output.outputPath, [
15
"div#lst-customers.listing",
16
]),
17
ensureFileRegexMatches(listingsQmd.output.outputPath, [
18
/Listing 1/,
19
/Listing 1: Customers Query/,
20
], [
21
/\?@sec-/,
22
]),
23
]);
24
25