Skip to content

Commit 9f8f0e9

Browse files
committed
test - add test for #12042
1 parent 493bd6e commit 9f8f0e9

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

tests/docs/convert/issue-12042.ipynb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"---\n",
8+
"title: My Document\n",
9+
"format: html\n",
10+
"jupyter: python3\n",
11+
"keep-ipynb: true\n",
12+
"---\n",
13+
"\n",
14+
"\n",
15+
"\n",
16+
"## Introduction\n",
17+
"\n",
18+
"Here I place some text."
19+
]
20+
}
21+
],
22+
"metadata": {
23+
"kernelspec": {
24+
"name": "python3",
25+
"language": "python",
26+
"display_name": "Python 3 (ipykernel)",
27+
"path": "/Users/cscheid/virtualenvs/homebrew-python3/share/jupyter/kernels/python3"
28+
}
29+
},
30+
"nbformat": 4,
31+
"nbformat_minor": 4
32+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* convert-backticks.test.ts
3+
*
4+
* Copyright (C) 2020-2024 Posit Software, PBC
5+
*
6+
*/
7+
import { existsSync } from "../../../src/deno_ral/fs.ts";
8+
import {
9+
ExecuteOutput,
10+
testQuartoCmd,
11+
} from "../../test.ts";
12+
import { assert } from "testing/asserts";
13+
14+
(() => {
15+
const input = "docs/convert/backticks.ipynb";
16+
testQuartoCmd(
17+
"convert",
18+
["docs/convert/issue-12042.ipynb"],
19+
[
20+
{
21+
name: "convert-markdown-after-yaml",
22+
verify: async (outputs: ExecuteOutput[]) => {
23+
const txt = Deno.readTextFileSync("docs/convert/issue-12042.qmd");
24+
assert(txt.includes("Here I place some text."), "Markdown text not found in output");
25+
}
26+
}
27+
],
28+
{
29+
teardown: async () => {
30+
if (existsSync("docs/convert/backticks.qmd")) {
31+
Deno.removeSync("docs/convert/backticks.qmd");
32+
}
33+
}
34+
},
35+
);
36+
})();

0 commit comments

Comments
 (0)