Path: blob/main/tests/smoke/extensions/extension-render-format-resources.test.ts
12925 views
/*1* extension-render-doc.test.ts2*3* Copyright (C) 2020-2022 Posit Software, PBC4*5*/67import { safeRemoveSync } from "../../../src/core/path.ts";8import { dirname, join } from "../../../src/deno_ral/path.ts";9import { fileLoader } from "../../utils.ts";10import { fileExists, folderExists, pathDoNotExists } from "../../verify.ts";11import { testRender } from "../render/render.ts";1213// This file uses custom formats 'test-html' provided by test extension14const input = fileLoader("extensions/format-resources/9918")("index.qmd", "test-html");15const rootDir = dirname(input.input)16const resourcesFile = [17join('folder-to-root', 'dummy.txt'),18'dummy-2.txt', 'dummy-3.txt', 'dummy-4.txt',19].map((x) => join(rootDir, x))20testRender(input.input, "test-html", false,21[22folderExists(join(rootDir, "folder-to-root")),23...resourcesFile.map(fileExists),24pathDoNotExists(join(rootDir, "dummy.txt")),25],26{27teardown: () => {28resourcesFile.forEach((x) => safeRemoveSync(x));29return Promise.resolve();30},31}32);3334