Skip to content

Commit 54b382c

Browse files
committed
fix test
1 parent 8734ff2 commit 54b382c

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

ingesters/__tests__/IngesterFactory.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('IngesterFactory', () => {
7474
DocumentSource.OPENZEPPELIN_DOCS,
7575
DocumentSource.CORELIB_DOCS,
7676
DocumentSource.SCARB_DOCS,
77-
DocumentSource.STARKNET_JS,
77+
// DocumentSource.STARKNET_JS is commented out in the enum
7878
DocumentSource.STARKNET_BLOG,
7979
DocumentSource.DOJO_DOCS,
8080
]);

ingesters/__tests__/StarknetDocsIngester.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('StarknetDocsIngester', () => {
1212
expect(ingester.config).toEqual({
1313
repoOwner: 'starknet-io',
1414
repoName: 'starknet-docs',
15-
fileExtensions: '.mdx',
15+
fileExtensions: ['.mdx'],
1616
chunkSize: 4096,
1717
chunkOverlap: 512,
1818
baseUrl: 'https://docs.starknet.io',

ingesters/src/ingesters/AsciiDocIngester.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ export abstract class AsciiDocIngester extends BaseIngester {
200200
hasRelevantFiles = true;
201201
}
202202
}
203-
} else if (entry.isFile() && path.extname(entry.name) === fileExtensions) {
203+
} else if (
204+
entry.isFile() &&
205+
path.extname(entry.name) === fileExtensions
206+
) {
204207
if (entry.name.toLowerCase() === 'nav.adoc') {
205208
continue;
206209
}

ingesters/src/utils/fileUtils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ export async function processDocFiles(
4444
}
4545

4646
pages.push({
47-
name: path
48-
.relative(directory, fullPath)
49-
.replace(fileExt, ''),
47+
name: path.relative(directory, fullPath).replace(fileExt, ''),
5048
content,
5149
});
5250
}

0 commit comments

Comments
 (0)