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-metadata.ts
6615 views
1
/*
2
* render-jats.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
*/
7
8
import { extname, 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 all the documents in this folder
18
const testDir = docs(join("author-normalization", "funding"));
19
20
for (const entry of Deno.readDirSync(testDir)) {
21
if (entry.isFile && extname(entry.name) === ".qmd") {
22
const input = join(testDir, entry.name);
23
const output = outputForInput(input, "jats");
24
testRender(input, "jats", true, [ensureXmlValidatesWithXsd(output.outputPath, xsdPath)]);
25
}
26
}
27
28
29