File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 683683 [[ " $status " -eq 0 ]] || [[ " $status " -eq 2 ]]
684684}
685685
686+ @test " clean_project_artifacts: handles empty menu options under set -u" {
687+ run env HOME=" $HOME " PROJECT_ROOT=" $PROJECT_ROOT " bash --noprofile --norc << 'EOF '
688+ set -euo pipefail
689+ source "$PROJECT_ROOT/lib/core/common.sh"
690+ source "$PROJECT_ROOT/lib/clean/project.sh"
691+
692+ mkdir -p "$HOME/www/test-project/node_modules"
693+ touch "$HOME/www/test-project/package.json"
694+
695+ PURGE_SEARCH_PATHS=("$HOME/www")
696+ get_dir_size_kb() { echo 0; }
697+
698+ clean_project_artifacts </dev/null
699+ EOF
700+
701+ [ " $status " -eq 0 ]
702+ [[ " $output " == * " No artifacts found to purge" * ]]
703+ }
704+
686705@test " clean_project_artifacts: dry-run does not count failed removals" {
687706 run env HOME=" $HOME " PROJECT_ROOT=" $PROJECT_ROOT " bash --noprofile --norc << 'EOF '
688707set -euo pipefail
You can’t perform that action at this time.
0 commit comments