diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-03 18:10:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-03 18:10:48 +0300 |
commit | af7ba639ec0b6bba26adc244e8971d4113d2c041 (patch) | |
tree | e5369d7cd9aaaca075c21dd5d709501e78d1089d /scripts | |
parent | 53ea1228bef63279e558b08b50144775f6f3a4c4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/frontend/check_no_partial_karma_jest.sh | 44 | ||||
-rwxr-xr-x | scripts/frontend/file_test_coverage.js | 2 | ||||
-rwxr-xr-x | scripts/static-analysis | 3 |
3 files changed, 2 insertions, 47 deletions
diff --git a/scripts/frontend/check_no_partial_karma_jest.sh b/scripts/frontend/check_no_partial_karma_jest.sh deleted file mode 100755 index c5fffa5900b..00000000000 --- a/scripts/frontend/check_no_partial_karma_jest.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -karma_directory=spec/javascripts - -if [ -d ee ]; then - karma_directory="$karma_directory ee/$karma_directory" -fi - -karma_files=$(find $karma_directory -type f -name '*_spec.js' -not -path '*/helpers/*') -violations="" - -for karma_file in $karma_files; do - jest_file=${karma_file/spec\/javascripts/"spec/frontend"} - - if [ -f $jest_file ]; then - violations="$violations $jest_file" - fi -done - -if [[ -z "$violations" ]]; then - echo "All good!" - exit 0 -else - echo "Danger! The following Jest specs have corresponding files in the Karma spec directory (i.e. spec/javascripts):" - echo "" - echo "------------------------------" - for file in $violations; do - echo $file - done - echo "------------------------------" - echo "" - echo "For each of these files, please either:" - echo "" - echo "1. Fully migrate the file to Jest and remove the corresponding Karma file." - echo "2. Remove the Jest file for now, make any relevant changes in the corresponding Karma file, and handle the migration to Jest in a separate MR." - echo "" - echo "Why is this a problem?" - echo "" - echo "- It's nice to have a single source of truth for the unit tests of a subject." - echo "- This will cause conflicts if the remaining Karma spec is migrated using our automated tool." - echo " https://gitlab.com/gitlab-org/frontend/playground/migrate-karma-to-jest" - echo "" - exit 1 -fi diff --git a/scripts/frontend/file_test_coverage.js b/scripts/frontend/file_test_coverage.js index 04a9035fce2..3ad92a5abbe 100755 --- a/scripts/frontend/file_test_coverage.js +++ b/scripts/frontend/file_test_coverage.js @@ -14,7 +14,7 @@ const fs = require('fs'); const path = require('path'); const sourceDirectories = ['app/assets/javascripts']; -const testDirectories = ['spec/javascripts', 'spec/frontend']; +const testDirectories = ['spec/frontend']; if (fs.existsSync('ee')) { sourceDirectories.forEach((dir) => { diff --git a/scripts/static-analysis b/scripts/static-analysis index 0576d8cdca9..6ad7c0b19c3 100755 --- a/scripts/static-analysis +++ b/scripts/static-analysis @@ -51,8 +51,7 @@ class StaticAnalysis Task.new(%w[scripts/lint-conflicts.sh], 1), Task.new(%w[yarn run block-dependencies], 1), Task.new(%w[scripts/lint-rugged], 1), - Task.new(%w[scripts/gemfile_lock_changed.sh], 1), - Task.new(%w[scripts/frontend/check_no_partial_karma_jest.sh], 1) + Task.new(%w[scripts/gemfile_lock_changed.sh], 1) ].compact.freeze def run_tasks!(options = {}) |