Skip to content

Commit 583564a

Browse files
committed
chore: cleanup
1 parent 3676bb4 commit 583564a

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

src/__tests__/generators.test.mjs

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import { describe, it } from 'node:test';
44
import createGenerator from '../generators.mjs';
55

66
describe('createGenerator', () => {
7-
// Simple mock input for testing
8-
const mockInput = [
9-
{
10-
file: { stem: 'test', basename: 'test.md' },
11-
tree: { type: 'root', children: [] },
12-
},
13-
];
14-
157
// Mock options with minimal required fields
168
const mockOptions = {
179
input: '/tmp/test',
@@ -27,14 +19,14 @@ describe('createGenerator', () => {
2719
};
2820

2921
it('should create a generator orchestrator with runGenerators method', () => {
30-
const { runGenerators } = createGenerator(mockInput);
22+
const { runGenerators } = createGenerator();
3123

3224
ok(runGenerators);
3325
strictEqual(typeof runGenerators, 'function');
3426
});
3527

3628
it('should return the ast input directly when generators list is empty', async () => {
37-
const { runGenerators } = createGenerator(mockInput);
29+
const { runGenerators } = createGenerator();
3830

3931
const results = await runGenerators({
4032
...mockOptions,
@@ -48,7 +40,7 @@ describe('createGenerator', () => {
4840
});
4941

5042
it('should run metadata generator', async () => {
51-
const { runGenerators } = createGenerator(mockInput);
43+
const { runGenerators } = createGenerator();
5244

5345
const results = await runGenerators({
5446
...mockOptions,
@@ -62,7 +54,7 @@ describe('createGenerator', () => {
6254
});
6355

6456
it('should handle generator with dependency', async () => {
65-
const { runGenerators } = createGenerator(mockInput);
57+
const { runGenerators } = createGenerator();
6658

6759
// legacy-html depends on metadata
6860
const results = await runGenerators({
@@ -76,7 +68,7 @@ describe('createGenerator', () => {
7668
});
7769

7870
it('should skip already scheduled generators', async () => {
79-
const { runGenerators } = createGenerator(mockInput);
71+
const { runGenerators } = createGenerator();
8072

8173
// Running with ['metadata', 'metadata'] should skip the second
8274
const results = await runGenerators({
@@ -90,7 +82,7 @@ describe('createGenerator', () => {
9082
});
9183

9284
it('should handle multiple generators in sequence', async () => {
93-
const { runGenerators } = createGenerator(mockInput);
85+
const { runGenerators } = createGenerator();
9486

9587
// Run metadata - just one generator
9688
const results = await runGenerators({
@@ -104,7 +96,7 @@ describe('createGenerator', () => {
10496
});
10597

10698
it('should collect async generator results for dependents', async () => {
107-
const { runGenerators } = createGenerator(mockInput);
99+
const { runGenerators } = createGenerator();
108100

109101
// legacy-json depends on metadata (async generator)
110102
const results = await runGenerators({
@@ -117,7 +109,7 @@ describe('createGenerator', () => {
117109
});
118110

119111
it('should use multiple threads when specified', async () => {
120-
const { runGenerators } = createGenerator(mockInput);
112+
const { runGenerators } = createGenerator();
121113

122114
const results = await runGenerators({
123115
...mockOptions,
@@ -132,7 +124,7 @@ describe('createGenerator', () => {
132124
});
133125

134126
it('should pass options to generators', async () => {
135-
const { runGenerators } = createGenerator(mockInput);
127+
const { runGenerators } = createGenerator();
136128

137129
const customTypeMap = { TestType: 'https://example.com/TestType' };
138130

src/generators/legacy-html/index.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@ export default {
137137
);
138138

139139
const deps = {
140-
index,
141-
releases,
142140
version,
143-
output,
144-
apiTemplate,
145141
parsedSideNav: String(parsedSideNav),
146142
};
147143

0 commit comments

Comments
 (0)