Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/inspect/inspect-cleanup.test.ts
12925 views
1
/*
2
* inspect-cleanup.test.ts
3
*
4
* Copyright (C) 2020-2025 Posit Software, PBC
5
*
6
*/
7
8
import { existsSync } from "../../../src/deno_ral/fs.ts";
9
import { } from "../../../src/project/types.ts";
10
import {
11
ExecuteOutput,
12
testQuartoCmd,
13
} from "../../test.ts";
14
import { assert } from "testing/asserts";
15
16
(() => {
17
const input = "docs/inspect/cleanup-issue-12336/cleanup-bug.qmd";
18
const output = "docs/inspect/cleanup-issue-12336/cleanup-bug.json";
19
testQuartoCmd(
20
"inspect",
21
[input, output],
22
[
23
{
24
name: "inspect-code-cells",
25
verify: async (outputs: ExecuteOutput[]) => {
26
assert(existsSync(output));
27
const json = JSON.parse(Deno.readTextFileSync(output));
28
assert(json.fileInformation["docs/inspect/cleanup-issue-12336/cleanup-bug.qmd"].metadata.engine === "jupyter");
29
assert(!existsSync("docs/inspect/cleanup-issue-12336/cleanup-bug.quarto_ipynb"));
30
}
31
}
32
],
33
{
34
teardown: async () => {
35
if (existsSync(output)) {
36
Deno.removeSync(output);
37
}
38
}
39
},
40
)})();
41