Skip to content

Commit

Permalink
test - add test for #12042
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Mar 6, 2025
1 parent 493bd6e commit 9f8f0e9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/docs/convert/issue-12042.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: My Document\n",
"format: html\n",
"jupyter: python3\n",
"keep-ipynb: true\n",
"---\n",
"\n",
"\n",
"\n",
"## Introduction\n",
"\n",
"Here I place some text."
]
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"language": "python",
"display_name": "Python 3 (ipykernel)",
"path": "/Users/cscheid/virtualenvs/homebrew-python3/share/jupyter/kernels/python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
36 changes: 36 additions & 0 deletions tests/smoke/convert/convert-issue-12042.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* convert-backticks.test.ts
*
* Copyright (C) 2020-2024 Posit Software, PBC
*
*/
import { existsSync } from "../../../src/deno_ral/fs.ts";
import {
ExecuteOutput,
testQuartoCmd,
} from "../../test.ts";
import { assert } from "testing/asserts";

(() => {
const input = "docs/convert/backticks.ipynb";
testQuartoCmd(
"convert",
["docs/convert/issue-12042.ipynb"],
[
{
name: "convert-markdown-after-yaml",
verify: async (outputs: ExecuteOutput[]) => {
const txt = Deno.readTextFileSync("docs/convert/issue-12042.qmd");
assert(txt.includes("Here I place some text."), "Markdown text not found in output");
}
}
],
{
teardown: async () => {
if (existsSync("docs/convert/backticks.qmd")) {
Deno.removeSync("docs/convert/backticks.qmd");
}
}
},
);
})();

0 comments on commit 9f8f0e9

Please sign in to comment.