Skip to content

Commit

Permalink
Sort files in findTestFiles
Browse files Browse the repository at this point in the history
After updating the glob package and trying out happo.io@v12.0.0-beta.1,
I noticed that there were some diffs that I hadn't expected. After some
investigation I noticed that the order of some of the test files in the
generated happo-entry.js file changed, which I think may have been
triggered by the changes in findTestFiles and the glob package update.

I am hoping to stabilize this by sorting the files.
  • Loading branch information
lencioni committed Feb 13, 2025
1 parent c286272 commit c795cb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/findTestFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ export default async function findTestFiles(pattern) {
const files = await glob(pattern, {
ignore: ['**/node_modules/**', '**/dist/**', '**/build/**'],
});
return files;

// Sort the files to make the output deterministic.
return files.sort((a, b) => a.localeCompare(b));
}

0 comments on commit c795cb5

Please sign in to comment.