Path: blob/main/tests/smoke/render/render-html.test.ts
12921 views
/*1* render-html.test.ts2*3* Copyright (C) 2024 Posit Software, PBC4*5*/67import { existsSync } from "../../../src/deno_ral/fs.ts";89import { testRender } from "./render.ts";10import { fileLoader } from "../../utils.ts";11import { join } from "path";12import { assert } from "testing/asserts";13import { isWindows } from "../../../src/deno_ral/platform.ts";1415const testFile = fileLoader()("test.qmd", "html");1617// Simple rendering tests18testRender(testFile.input, "html", false, [], {19teardown: async () => {20// Bootstrap files should be in the libs folder21const bootstrapPath = join(testFile.output.supportPath, "libs", "bootstrap");22assert(existsSync(bootstrapPath), `Expected ${bootstrapPath} to exist`);23// Check that the bootstrap files have the correct mode24// Related to #660, and #1153225if (!isWindows) {26const files = Deno.readDirSync(bootstrapPath);27for (const file of files) {28if (file.name.match(/bootstrap-.*\.min\.css$/)) {29const fileInfo = Deno.statSync(join(bootstrapPath, file.name));30assert(31fileInfo.mode?.toString(8) === "100644",32`Expected file mode 100644, got ${fileInfo.mode?.toString(8)}`33);34}35}36}37},38});3940