Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/directives/include-fixups.test.ts
6442 views
1
/*
2
* include-fixups.test.ts
3
*
4
* Copyright (C) 2021-2022 Posit Software, PBC
5
*
6
*/
7
8
/* Disable test for temporarily removed feature.
9
10
import { ensureHtmlSelectorSatisfies } from "../../verify.ts";
11
12
import { testRender } from "../render/render.ts";
13
14
import { fileLoader } from "../../utils.ts";
15
import { Element } from "../../../src/core/deno-dom.ts";
16
import * as ld from "../../../src/core/lodash.ts";
17
18
const directives = fileLoader("directives");
19
20
const test1 = directives("include/test1/index.qmd", "html");
21
testRender(test1.input, "html", false, [
22
ensureHtmlSelectorSatisfies(test1.output.outputPath, "a", (nodeList) => {
23
const nodes = Array.from(nodeList);
24
const targets = nodes.map((node) => (node as Element).getAttribute("href"));
25
return ld.isEqual(targets, [
26
"sub/../link.qmd",
27
"sub/sub/../link.qmd",
28
"sub/sub/../link.qmd",
29
"../link.qmd",
30
"sub/../link.qmd",
31
"sub/sub/../link.qmd",
32
"sub/sub/../link.qmd",
33
"../link.qmd",
34
"../link.qmd",
35
"../link.qmd",
36
"sub/sub/../link.qmd",
37
"../link.qmd",
38
]);
39
}),
40
]);*/
41
42