|
4 | 4 | Error.stackTraceLimit = 50;
|
5 | 5 | import ts from "typescript";
|
6 | 6 | import fs from "fs";
|
7 |
| -import { rm } from "fs/promises"; |
8 | 7 | import path, { basename, join } from "path";
|
9 | 8 | import * as td from "../dist/index.js";
|
10 | 9 | import { getExpandedEntryPointsForPaths } from "../dist/lib/utils/index.js";
|
11 | 10 | import { ok } from "assert";
|
12 | 11 | import { fileURLToPath } from "url";
|
13 | 12 | import { diagnostics } from "../dist/lib/utils/loggers.js";
|
14 |
| -import { getConverter2App, getConverter2Project, getConverterApp } from "../dist/test/programs.js"; |
15 |
| -import { TestRouter, TestTheme } from "../dist/test/renderer/testRendererUtils.js"; |
| 13 | +import { getConverterApp } from "../dist/test/programs.js"; |
| 14 | +import { buildRendererSpecs } from "../dist/test/renderer/testRendererUtils.js"; |
16 | 15 |
|
17 | 16 | const base = path.join(
|
18 | 17 | fileURLToPath(import.meta.url),
|
19 | 18 | "../../src/test/converter",
|
20 | 19 | );
|
21 | 20 |
|
22 | 21 | const app = getConverterApp();
|
23 |
| -const app2 = getConverter2App(); |
24 |
| - |
25 |
| -app2.renderer.defineTheme("test-theme", TestTheme); |
26 |
| -app2.renderer.defineRouter("test-router", TestRouter); |
27 | 22 |
|
28 | 23 | app.serializer.addSerializer({
|
29 | 24 | priority: -1,
|
@@ -128,19 +123,7 @@ function rebuildConverterTests(dirs) {
|
128 | 123 | /** @param {string} specPath */
|
129 | 124 | async function rebuildRendererTest(specPath) {
|
130 | 125 | console.log(specPath);
|
131 |
| - await rm(specPath, { recursive: true, force: true }); |
132 |
| - |
133 |
| - app2.options.setValue("theme", "test-theme"); |
134 |
| - app2.options.setValue("router", "test-router"); |
135 |
| - app2.options.setValue("disableGit", true); |
136 |
| - app2.options.setValue("sourceLinkTemplate", "{path}"); |
137 |
| - |
138 |
| - td.resetReflectionID(); |
139 |
| - const project = getConverter2Project(["renderer"], "."); |
140 |
| - project.readme = [{ kind: "text", text: "Readme text" }]; |
141 |
| - await app2.generateDocs(project, specPath); |
142 |
| - await rm(`${specPath}/assets`, { recursive: true }); |
143 |
| - await rm(`${specPath}/.nojekyll`); |
| 126 | + await buildRendererSpecs(specPath); |
144 | 127 | }
|
145 | 128 |
|
146 | 129 | async function main() {
|
|
0 commit comments