Skip to content

Commit bea7947

Browse files
committed
Add a test for missing documentation for tags
1 parent 700ee86 commit bea7947

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

site/options/output.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ $ typedoc --html <path/to/documentation/>
6868
```
6969

7070
Specifies the location the html documentation should be written to. The HTML
71-
output produced by running TypeDoc on itself can be seen at {@link "TypeDoc
72-
API"}
71+
output produced by running TypeDoc on itself can be seen at {@link "TypeDoc API"}
7372

7473
This option is an output shortcut. If specified, the [outputs](#outputs) option
7574
will be overwritten by this option and any other specified output shortcuts.

src/test/slow/entry-point.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
import { type Project, tempdirProject } from "@typestrong/fs-fixture-builder";
1+
import { tempdirProject } from "@typestrong/fs-fixture-builder";
22
import { deepStrictEqual as equal, ok } from "assert";
33
import { join } from "path";
44
import { Application, EntryPointStrategy } from "../../index.js";
55

66
describe("Entry Points", () => {
7-
let fixture: Project;
8-
let tsconfig: string;
7+
using fixture = tempdirProject();
8+
const tsconfig = join(fixture.cwd, "tsconfig.json");
99

1010
beforeEach(() => {
11-
fixture = tempdirProject();
12-
tsconfig = join(fixture.cwd, "tsconfig.json");
13-
11+
fixture.files.length = 0;
1412
fixture.addJsonFile("tsconfig.json", {
1513
include: ["."],
1614
});

src/test/utils/fs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ describe("fs.ts", () => {
176176
});
177177

178178
describe("inferPackageEntryPointPaths", () => {
179-
const fixture = tempdirProject();
179+
using fixture = tempdirProject();
180180
afterEach(() => fixture.rm());
181181
const packagePath = (path: string) =>
182182
normalizePath(join(fixture.cwd, path));

src/test/utils/options/tsdoc-defaults.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { join } from "path";
33
import ts from "typescript";
44
import * as defaults from "../../../lib/utils/options/tsdoc-defaults.js";
55
import { fileURLToPath } from "url";
6+
import { unique } from "../../../lib/utils/array.js";
7+
import { readdirSync } from "fs";
8+
import { TYPEDOC_ROOT } from "../../../lib/utils/general.js";
69

710
describe("tsdoc-defaults.ts", () => {
811
const tsdoc = ts.readConfigFile(
@@ -59,4 +62,19 @@ describe("tsdoc-defaults.ts", () => {
5962

6063
equal(tsdocTags, typedocTags);
6164
});
65+
66+
// GERRIT Failing currently, ~20 tags to document still
67+
it.skip("Should only include tags which are documented on the website", () => {
68+
const tags = unique([
69+
...defaults.blockTags,
70+
...defaults.modifierTags,
71+
...defaults.inlineTags,
72+
]).sort();
73+
74+
const documentedTags = readdirSync(TYPEDOC_ROOT + "/site/tags")
75+
.map((file) => "@" + file.replace(".md", ""))
76+
.sort();
77+
78+
equal(tags, documentedTags);
79+
});
6280
});

0 commit comments

Comments
 (0)