Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/engine/include-engine-detection.test.ts
12925 views
1
/*
2
* include-engine-detection.test.ts
3
*
4
* Copyright (C) 2021-2022 Posit Software, PBC
5
*
6
*/
7
8
import { fileLoader } from "../../utils.ts";
9
import { ensureHtmlSelectorSatisfies } from "../../verify.ts";
10
import { testRender } from "../render/render.ts";
11
12
const qmd = fileLoader("engine")("test-include-engine-detection.qmd", "html");
13
testRender(qmd.input, "html", false, [
14
ensureHtmlSelectorSatisfies(
15
qmd.output.outputPath,
16
"p",
17
(nodelist) => {
18
return Array.from(nodelist).map((x) => x.textContent).some((x) =>
19
x.indexOf("1001") !== -1
20
);
21
},
22
),
23
]);
24
25