diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2019-05-23 08:32:09 -0500 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-05-23 08:32:43 -0500 |
commit | 447914b31c2387a06f5452f83cc7a4dfe972e9f2 (patch) | |
tree | 16db6d8e6475c9027f52785b96cfb20d50b7c06e | |
parent | 76c8d4fbedb57a3744d32cf52c0acee91eb751f5 (diff) | |
download | gitlab-ce-fe-move-to-jest.tar.gz |
Move to jest <exclamation-mark-here>fe-move-to-jest
-rwxr-xr-x | scripts/frontend/move_to_jest.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/frontend/move_to_jest.sh b/scripts/frontend/move_to_jest.sh new file mode 100755 index 00000000000..fcf6717d7e7 --- /dev/null +++ b/scripts/frontend/move_to_jest.sh @@ -0,0 +1,18 @@ +git add $0 +git stash --keep-index --include-untracked + +for source_file in $(find spec/javascripts -type f) +do + dest_file=$(echo $source_file | sed "s|spec/javascripts|spec/frontend|") + dest_dir=$(dirname $dest_file) + + # Move it! + mkdir -p $dest_dir + mv $source_file $dest_file + + # Jest it! + sed -i "s/^.*jasmine.clock.*.install.*$/ /g" $dest_file + sed -i "s/^.*jasmine.clock.*.uninstall.*$/ /g" $dest_file +done + +yarn run jest --bail |