Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/jats/render-jats.test.ts
6575 views
1
/*
2
* render-jats.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
*/
7
8
import { join } from "../../../src/deno_ral/path.ts";
9
import { docs, outputForInput } from "../../utils.ts";
10
import {
11
ensureXmlValidatesWithXsd,
12
} from "../../verify.ts";
13
import { testRender } from "../render/render.ts";
14
15
const xsdPath = docs(join("jats", "xsd", "JATS-Archiving-1-2-MathML2-DTD"));
16
17
// Test a basic JATS document that tests a variety of elements
18
const input = docs(join("jats", "basic.qmd"));
19
const output = outputForInput(input, "jats");
20
testRender(input, "jats", false, [ensureXmlValidatesWithXsd(output.outputPath, xsdPath)]);
21
22
// Test a nearly empty document
23
const emptyInput = docs(join("jats", "empty.qmd"));
24
const emptyOutput = outputForInput(emptyInput, "jats");
25
testRender(emptyInput, "jats", true, [ensureXmlValidatesWithXsd(emptyOutput.outputPath, xsdPath)]);
26
27