Skip to content

Commit 2b7b34d

Browse files
committed
ACP2E-2702: [Core] Fix JS static test to handle the case when there are no files in dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist
1 parent e53e613 commit 2b7b34d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dev/tools/grunt/tools/collect-validation-files.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ module.exports = {
4747
},
4848

4949
getFiles: function (file) {
50+
var files;
51+
5052
if (file) {
5153
return file.split(',');
5254
}
@@ -55,6 +57,11 @@ module.exports = {
5557
fst.write(pc.static.tmp, this.getFilesForValidate());
5658
}
5759

58-
return fst.getData(pc.static.tmp);
60+
files = fst.getData(pc.static.tmp);
61+
if (files.length === 1 && files[0] === '') {
62+
files = [];
63+
}
64+
65+
return files;
5966
}
6067
};

0 commit comments

Comments
 (0)