Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 6e8d294

Browse files
Always load all MD files to check for images (#500)
1 parent 626489f commit 6e8d294

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/images.test.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ const getImagesInAst = (ast, /*filePath*/) => {
139139

140140
// Get a list of images used in all files
141141
const getAllUsedImages = async () => {
142-
const imagesUsedInDocs = await filePaths.reduce(async (imageListPromise, filePath) => {
142+
// Get all files, not files that may be limited by argv.filesToCheck
143+
const allMDFiles = await glob(docsFolder + '/**/*.{md,mdx}');
144+
const imagesUsedInDocs = await allMDFiles.reduce(async (imageListPromise, filePath) => {
143145
const imageList = await imageListPromise;
144146
const ast = await getAst(filePath);
145147
const imagesInAst = getImagesInAst(ast, filePath);

0 commit comments

Comments
 (0)