Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/inspect/inspect-extensions.test.ts
12921 views
1
/*
2
* inspect-extensions.test.ts
3
*
4
* Copyright (C) 2025 Posit Software, PBC
5
*
6
*/
7
import { assertObjectMatch } from "https://deno.land/[email protected]/assert/assert_object_match.ts";
8
import { existsSync } from "../../../src/deno_ral/fs.ts";
9
import { FileInclusion } from "../../../src/project/types.ts";
10
import {
11
ExecuteOutput,
12
testQuartoCmd,
13
} from "../../test.ts";
14
import { assert, assertEquals } from "testing/asserts";
15
16
(() => {
17
const input = "docs/inspect/website-with-extensions/extension-test";
18
const output = "docs/inspect/website-with-extensions.json";
19
testQuartoCmd(
20
"inspect",
21
[input, output],
22
[
23
{
24
name: "inspect-extensions",
25
verify: async (outputs: ExecuteOutput[]) => {
26
assert(existsSync(output));
27
const json = JSON.parse(Deno.readTextFileSync(output));
28
assert(json.extensions.length === 3);
29
// 0 is orange-book, 1 is julia-engine (bundled extensions)
30
assertEquals(json.extensions[2].title, "Auto Dark Mode");
31
}
32
}
33
],
34
{
35
teardown: async () => {
36
if (existsSync(output)) {
37
Deno.removeSync(output);
38
}
39
}
40
},
41
);
42
})();
43
44