Skip to content

Commit 623cf11

Browse files
vsemozhetbyttargos
authored andcommitted
test: skip non-doc files in test-make-doc checks
PR-URL: #21531Fixes: #21519 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
1 parent 0f1d737 commit 623cf11

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎test/doctool/test-make-doc.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ const apiPath = path.resolve(__dirname, '..', '..', 'out', 'doc', 'api');
1515
constallDocs=fs.readdirSync(apiPath);
1616
assert.ok(allDocs.includes('_toc.html'));
1717

18-
constfilter=['assets','_toc.html','.md'];
1918
constactualDocs=allDocs.filter(
20-
(name)=>!filter.some((str)=>name.includes(str))
19+
(name)=>{
20+
constextension=path.extname(name);
21+
return(extension==='.html'||extension==='.json')&&
22+
name!=='_toc.html';
23+
}
2124
);
2225

2326
consttoc=fs.readFileSync(path.resolve(apiPath,'_toc.html'),'utf8');

0 commit comments

Comments
 (0)