Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/integration/mermaid/github-issue-1340.test.ts
6434 views
1
/*
2
* github-issue-1340.test.ts
3
*
4
* Copyright (C) 2022 Posit Software, PBC
5
*
6
*/
7
8
import { docs, fileLoader, outputForInput } from "../../utils.ts";
9
import {
10
ensureHtmlElements,
11
ensureHtmlSelectorSatisfies,
12
verifyPath,
13
} from "../../verify.ts";
14
import { testRender } from "../../smoke/render/render.ts";
15
import { ExecuteOutput } from "../../test.ts";
16
import { join } from "../../../src/deno_ral/path.ts";
17
18
const input = docs("bug-repros/issue-1340/");
19
const output = join(input, "_book");
20
// const output = outputForInput(join(input, "index.qmd"), "html"); <- doesn't work for book projects, right.
21
testRender(input, "html", false, [{
22
name: "file exists",
23
verify: (_outputs: ExecuteOutput[]): Promise<void> => {
24
verifyPath(
25
join(
26
output,
27
"index_files",
28
"figure-html",
29
"plot1-1.png",
30
),
31
);
32
return Promise.resolve();
33
},
34
}, {
35
name: "manual cleanup for book project",
36
verify: (_outputs: ExecuteOutput[]): Promise<void> => {
37
Deno.removeSync(output, { recursive: true });
38
Deno.removeSync(join(input, ".quarto"), { recursive: true });
39
Deno.removeSync(join(input, ".gitignore"));
40
41
return Promise.resolve();
42
},
43
}]);
44
45