diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /scripts/frontend/check_no_partial_karma_jest.sh | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'scripts/frontend/check_no_partial_karma_jest.sh')
-rwxr-xr-x | scripts/frontend/check_no_partial_karma_jest.sh | 44 |
1 files changed, 0 insertions, 44 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 |