Path: blob/main/tests/smoke/convert/issue-12318.test.ts
12925 views
/*1* convert-backticks.test.ts2*3* Copyright (C) 2020-2024 Posit Software, PBC4*5*/67import { existsSync } from "../../../src/deno_ral/fs.ts";8import {9ExecuteOutput,10test,11} from "../../test.ts";12import { assert } from "testing/asserts";13import { quarto } from "../../../src/quarto.ts";1415(() => {16const input = "docs/convert/issue-12318";17test({18// The name of the test19name: "issue-12318",2021// Sets up the test22context: {23teardown: async () => {24if (existsSync(input + '.ipynb')) {25Deno.removeSync(input + '.ipynb');26}27}28},2930// Executes the test31execute: async () => {32await quarto(["convert", "docs/convert/issue-12318.qmd"]);33await quarto(["convert", "docs/convert/issue-12318.ipynb", "--output", "issue-12318-2.qmd"]);34const txt = Deno.readTextFileSync("issue-12318-2.qmd");35assert(!txt.includes('}```'), "Triple backticks found not at beginning of line");36},3738verify: [],39type: "unit"40});41})();424344