Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/jats/render-manuscript.test.ts
6468 views
1
/*
2
* render-manuscript.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
*/
7
8
import { dirname, join } from "../../../src/deno_ral/path.ts";
9
import { docs, outputForInput } from "../../utils.ts";
10
import { ensureMECAValidates, ensureXmlValidatesWithXsd } from "../../verify.ts";
11
import { testRender } from "../render/render.ts";
12
13
const xsdPath = docs(join("jats", "xsd", "JATS-Archiving-1-2-MathML2-DTD"));
14
15
const testContext = undefined;
16
const args = undefined;
17
18
// Test a basic manuscript render (this will include a sub-notebook which should
19
// nonetheless validate)
20
const input = docs(join("jats", "manuscript", "index.ipynb"));
21
const output = outputForInput(input, "jats");
22
const mecaOutput = join(dirname(output.outputPath), "index-meca.zip");
23
24
// Test the article and ensure that it validates
25
testRender(
26
input,
27
"jats",
28
false,
29
[ensureXmlValidatesWithXsd(output.outputPath, xsdPath), ensureMECAValidates(mecaOutput)],
30
testContext,
31
args
32
);
33
34