Skip to content

Commit 8d0ea4a

Browse files
committed
Improve test coverage again
1 parent ca5f025 commit 8d0ea4a

File tree

15 files changed

+1443
-84
lines changed

15 files changed

+1443
-84
lines changed

scripts/rebuild_specs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ async function rebuildRendererTest(specPath) {
132132

133133
app2.options.setValue("theme", "test-theme");
134134
app2.options.setValue("router", "test-router");
135-
app2.options.setValue("disableSources", true);
136135
app2.options.setValue("disableGit", true);
137-
app2.options.setValue("sourceLinkTemplate", "{path}:{line}");
136+
app2.options.setValue("sourceLinkTemplate", "{path}");
138137

139138
td.resetReflectionID();
140139
const project = getConverter2Project(["renderer"], ".");

src/lib/converter/plugins/SourcePlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export class SourcePlugin extends ConverterComponent {
5959
}
6060

6161
private onEnd() {
62-
// Should probably clear repositories/ignoredPaths here, but these aren't likely to change between runs...
6362
this.fileNames.clear();
63+
delete this.repositories;
6464
}
6565

6666
/**

src/test/converter2/renderer/index.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@
77

88
// Exports from this file will be rendered for the renderer snapshot testing
99

10-
export class BaseClass {}
10+
export interface BaseInterface {
11+
/** Interface method */
12+
method(x: string): void;
13+
14+
base(): void;
15+
}
16+
17+
export abstract class BaseClass {
18+
/** Base class method */
19+
method(x: string) {}
20+
21+
base() {}
22+
}
1123

1224
/** Renderer class */
1325
export class RenderClass extends BaseClass {

src/test/renderer/DefaultTheme.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ describe("DefaultTheme", () => {
2323

2424
app.options.setValue("theme", "test-theme");
2525
app.options.setValue("router", "test-router");
26-
app.options.setValue("disableSources", true);
2726
app.options.setValue("disableGit", true);
28-
app.options.setValue("sourceLinkTemplate", "{path}:{line}");
27+
app.options.setValue("sourceLinkTemplate", "{path}");
2928

3029
resetReflectionID();
3130
const project = getConverter2Project(["renderer"], ".");

src/test/renderer/specs/classes/BaseClass.json

Lines changed: 350 additions & 43 deletions
Large diffs are not rendered by default.

src/test/renderer/specs/classes/GenericClass.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@
6969
}
7070
]
7171
},
72+
{
73+
"aside.tsd-sources": {
74+
"ul": {
75+
"li": [
76+
"Defined in ",
77+
{
78+
"tag": "a",
79+
"props": {
80+
"href": "index.ts"
81+
},
82+
"children": "index.ts:60"
83+
}
84+
]
85+
}
86+
}
87+
},
7288
{
7389
"section.tsd-panel-group.tsd-index-group": {
7490
"section.tsd-panel.tsd-index-panel": {
@@ -449,6 +465,22 @@
449465
"span.tsd-signature-type": "void"
450466
}
451467
]
468+
},
469+
{
470+
"aside.tsd-sources": {
471+
"ul": {
472+
"li": [
473+
"Defined in ",
474+
{
475+
"tag": "a",
476+
"props": {
477+
"href": "index.ts"
478+
},
479+
"children": "index.ts:61"
480+
}
481+
]
482+
}
483+
}
452484
}
453485
]
454486
}

src/test/renderer/specs/classes/ModifiersClass.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,22 @@
2525
}
2626
]
2727
},
28+
{
29+
"aside.tsd-sources": {
30+
"ul": {
31+
"li": [
32+
"Defined in ",
33+
{
34+
"tag": "a",
35+
"props": {
36+
"href": "index.ts"
37+
},
38+
"children": "index.ts:64"
39+
}
40+
]
41+
}
42+
}
43+
},
2844
{
2945
"section.tsd-panel-group.tsd-index-group": {
3046
"section.tsd-panel.tsd-index-panel": {
@@ -278,6 +294,22 @@
278294
]
279295
}
280296
}
297+
},
298+
{
299+
"aside.tsd-sources": {
300+
"ul": {
301+
"li": [
302+
"Defined in ",
303+
{
304+
"tag": "a",
305+
"props": {
306+
"href": "index.ts"
307+
},
308+
"children": "index.ts:70"
309+
}
310+
]
311+
}
312+
}
281313
}
282314
]
283315
},
@@ -316,6 +348,22 @@
316348
"span.tsd-signature-symbol": " = 1"
317349
}
318350
]
351+
},
352+
{
353+
"aside.tsd-sources": {
354+
"ul": {
355+
"li": [
356+
"Defined in ",
357+
{
358+
"tag": "a",
359+
"props": {
360+
"href": "index.ts"
361+
},
362+
"children": "index.ts:65"
363+
}
364+
]
365+
}
366+
}
319367
}
320368
]
321369
},
@@ -351,6 +399,22 @@
351399
"span.tsd-signature-symbol": " = 3"
352400
}
353401
]
402+
},
403+
{
404+
"aside.tsd-sources": {
405+
"ul": {
406+
"li": [
407+
"Defined in ",
408+
{
409+
"tag": "a",
410+
"props": {
411+
"href": "index.ts"
412+
},
413+
"children": "index.ts:67"
414+
}
415+
]
416+
}
417+
}
354418
}
355419
]
356420
},
@@ -386,6 +450,22 @@
386450
"span.tsd-signature-type": "4"
387451
}
388452
]
453+
},
454+
{
455+
"aside.tsd-sources": {
456+
"ul": {
457+
"li": [
458+
"Defined in ",
459+
{
460+
"tag": "a",
461+
"props": {
462+
"href": "index.ts"
463+
},
464+
"children": "index.ts:68"
465+
}
466+
]
467+
}
468+
}
389469
}
390470
]
391471
}

0 commit comments

Comments
 (0)