Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/convert/issue-12318.test.ts
12925 views
1
/*
2
* convert-backticks.test.ts
3
*
4
* Copyright (C) 2020-2024 Posit Software, PBC
5
*
6
*/
7
8
import { existsSync } from "../../../src/deno_ral/fs.ts";
9
import {
10
ExecuteOutput,
11
test,
12
} from "../../test.ts";
13
import { assert } from "testing/asserts";
14
import { quarto } from "../../../src/quarto.ts";
15
16
(() => {
17
const input = "docs/convert/issue-12318";
18
test({
19
// The name of the test
20
name: "issue-12318",
21
22
// Sets up the test
23
context: {
24
teardown: async () => {
25
if (existsSync(input + '.ipynb')) {
26
Deno.removeSync(input + '.ipynb');
27
}
28
}
29
},
30
31
// Executes the test
32
execute: async () => {
33
await quarto(["convert", "docs/convert/issue-12318.qmd"]);
34
await quarto(["convert", "docs/convert/issue-12318.ipynb", "--output", "issue-12318-2.qmd"]);
35
const txt = Deno.readTextFileSync("issue-12318-2.qmd");
36
assert(!txt.includes('}```'), "Triple backticks found not at beginning of line");
37
},
38
39
verify: [],
40
type: "unit"
41
});
42
})();
43
44