Path: blob/main/tests/smoke/jats/render-jats.test.ts
6575 views
/*1* render-jats.test.ts2*3* Copyright (C) 2020-2022 Posit Software, PBC4*5*/67import { join } from "../../../src/deno_ral/path.ts";8import { docs, outputForInput } from "../../utils.ts";9import {10ensureXmlValidatesWithXsd,11} from "../../verify.ts";12import { testRender } from "../render/render.ts";1314const xsdPath = docs(join("jats", "xsd", "JATS-Archiving-1-2-MathML2-DTD"));1516// Test a basic JATS document that tests a variety of elements17const input = docs(join("jats", "basic.qmd"));18const output = outputForInput(input, "jats");19testRender(input, "jats", false, [ensureXmlValidatesWithXsd(output.outputPath, xsdPath)]);2021// Test a nearly empty document22const emptyInput = docs(join("jats", "empty.qmd"));23const emptyOutput = outputForInput(emptyInput, "jats");24testRender(emptyInput, "jats", true, [ensureXmlValidatesWithXsd(emptyOutput.outputPath, xsdPath)]);252627