aboutsummaryrefslogtreecommitdiff
path: root/test/json.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/json.test.js')
-rw-r--r--test/json.test.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/json.test.js b/test/json.test.js
index 0689913a..aa12dc09 100644
--- a/test/json.test.js
+++ b/test/json.test.js
@@ -110,11 +110,11 @@ describe.concurrent('JSON validation', () => {
const existingJsonFiles = getAllFiles(rootDir, (path, isDirectory) => {
const fileNameNormalized = normalizePathDirectorySeparators(path);
- if (isDirectory) {
- return !ignoreDirectories.has(fileNameNormalized);
- } else {
- return /\.json$/i.test(fileNameNormalized);
- }
+ return (
+ isDirectory ?
+ !ignoreDirectories.has(fileNameNormalized) :
+ /\.json$/i.test(fileNameNormalized)
+ );
});
/** @type {Set<string>} */
const existingJsonFileSet = new Set();