Path: blob/main/tests/smoke/website/website-ignore-dirs.test.ts
12925 views
/*1* website-ignore-dirs.test.ts2*3* Verifies that engine-specific ignore directories (venv, renv, env, packrat, etc.)4* are properly excluded from website file discovery and rendering.5*6* Copyright (C) 2020-2025 Posit Software, PBC7*/89import { docs } from "../../utils.ts";10import { join } from "../../../src/deno_ral/path.ts";11import { existsSync } from "../../../src/deno_ral/fs.ts";12import { testQuartoCmd } from "../../test.ts";13import { fileExists, noErrors, pathDoNotExists } from "../../verify.ts";1415const renderDir = docs("websites/website-ignore-dirs");16const outDir = join(Deno.cwd(), renderDir, "_site");1718// Test that engine ignore directories are properly excluded19testQuartoCmd(20"render",21[renderDir],22[23noErrors,24fileExists(join(outDir, "index.html")), // Control: regular file should be rendered25pathDoNotExists(join(outDir, "venv", "test.html")), // venv (Jupyter) should be ignored26pathDoNotExists(join(outDir, "renv", "test.html")), // renv (Knitr) should be ignored27pathDoNotExists(join(outDir, "env", "test.html")), // env (Jupyter) should be ignored28],29{30teardown: async () => {31if (existsSync(outDir)) {32await Deno.remove(outDir, { recursive: true });33}34},35},36);373839