summaryrefslogtreecommitdiff
path: root/scripts/frontend/file_test_coverage.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-23 21:10:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-23 21:10:24 +0000
commit5838993b5f3e2d861d9dd7c82dfeea71506b9fc2 (patch)
treecaab6621fb79f06a355f802dc885982f746b544d /scripts/frontend/file_test_coverage.js
parentb8d021cb606ac86f41a0ef9dacd133a9677f8414 (diff)
downloadgitlab-ce-5838993b5f3e2d861d9dd7c82dfeea71506b9fc2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/frontend/file_test_coverage.js')
-rwxr-xr-xscripts/frontend/file_test_coverage.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/frontend/file_test_coverage.js b/scripts/frontend/file_test_coverage.js
index 7d1eb45d4bc..ec6ec4a1e9d 100755
--- a/scripts/frontend/file_test_coverage.js
+++ b/scripts/frontend/file_test_coverage.js
@@ -17,11 +17,11 @@ const sourceDirectories = ['app/assets/javascripts'];
const testDirectories = ['spec/javascripts', 'spec/frontend'];
if (fs.existsSync('ee')) {
- sourceDirectories.forEach(dir => {
+ sourceDirectories.forEach((dir) => {
sourceDirectories.push(`ee/${dir}`);
});
- testDirectories.forEach(dir => {
+ testDirectories.forEach((dir) => {
testDirectories.push(`ee/${dir}`);
});
}
@@ -29,10 +29,10 @@ if (fs.existsSync('ee')) {
let numSourceFiles = 0;
let numTestFiles = 0;
-const isVerbose = process.argv.some(arg => arg === '-v');
+const isVerbose = process.argv.some((arg) => arg === '-v');
-const countSourceFiles = path =>
- forEachFileIn(path, fileName => {
+const countSourceFiles = (path) =>
+ forEachFileIn(path, (fileName) => {
if (fileName.endsWith('.vue') || fileName.endsWith('.js')) {
if (isVerbose) {
console.log(`source file: ${fileName}`);
@@ -42,8 +42,8 @@ const countSourceFiles = path =>
}
});
-const countTestFiles = path =>
- forEachFileIn(path, fileName => {
+const countTestFiles = (path) =>
+ forEachFileIn(path, (fileName) => {
if (fileName.endsWith('_spec.js')) {
if (isVerbose) {
console.log(`test file: ${fileName}`);
@@ -63,7 +63,7 @@ function forEachFileIn(dirPath, callback) {
return;
}
- files.forEach(fileName => {
+ files.forEach((fileName) => {
const absolutePath = path.join(dirPath, fileName);
const stats = fs.statSync(absolutePath);
if (stats.isFile()) {