diff --git a/tests/template/agent-instructions.bats b/tests/template/agent-instructions.bats index 7056ce8..c9d30c6 100644 --- a/tests/template/agent-instructions.bats +++ b/tests/template/agent-instructions.bats @@ -16,15 +16,6 @@ CLAUDE_TEMPLATE="$DOTFILES_ROOT/home/dot_claude/CLAUDE.md.tmpl" assert_line 'Use `gh` CLI for all GitHub interactions. Never clone repositories to read code.' } -@test "agent instruction templates use markdown template source" { - [ -f "$DOTFILES_ROOT/home/.chezmoitemplates/AGENTS.md" ] - [ ! -e "$DOTFILES_ROOT/home/.chezmoidata/agents.yaml" ] - - claude_template="$(<"$CLAUDE_TEMPLATE")" - - [[ "$claude_template" == *'{{ template "AGENTS.md" . -}}'* ]] -} - @test "agent instruction templates render Graphify guidance" { run render_chezmoi_template "$CLAUDE_TEMPLATE" diff --git a/tests/template/darwin-install-scripts.bats b/tests/template/darwin-install-scripts.bats index a434a21..8ebead1 100644 --- a/tests/template/darwin-install-scripts.bats +++ b/tests/template/darwin-install-scripts.bats @@ -29,18 +29,6 @@ AI_MCP_TEMPLATE="$DOTFILES_ROOT/home/.chezmoiscripts/darwin/run_onchange_08_inst assert_file_contains "$DOTFILES_ROOT/home/.chezmoiscripts/darwin/run_onchange_05_defaults.sh.tmpl" '{{ template "lib/darwin/defaults.sh" . }}' } -@test "darwin install script templates inject Graphify shell library" { - assert_file_contains "$GRAPHIFY_TEMPLATE" '{{ template "lib/install/graphify-skills.sh" . }}' -} - -@test "darwin install script templates inject AI skills shell library" { - assert_file_contains "$AI_SKILLS_TEMPLATE" '{{ template "lib/install/ai-skills.sh" . }}' -} - -@test "darwin install script templates inject AI plugins shell library" { - assert_file_contains "$AI_PLUGINS_TEMPLATE" '{{ template "lib/install/ai-plugins.sh" . }}' -} - @test "darwin install script templates inject the install prelude" { local prelude='{{ template "lib/common/install-prelude.sh" . }}' assert_file_contains "$DOTFILES_ROOT/home/.chezmoiscripts/darwin/run_once_01_install-homebrew.sh.tmpl" "$prelude" @@ -206,10 +194,6 @@ AI_MCP_TEMPLATE="$DOTFILES_ROOT/home/.chezmoiscripts/darwin/run_onchange_08_inst refute_line --partial 'ai_plugins_install_main' } -@test "darwin install script templates inject AI MCP shell library" { - assert_file_contains "$AI_MCP_TEMPLATE" '{{ template "lib/install/ai-mcp.sh" . }}' -} - @test "darwin install script templates inject the prelude before AI MCP" { local prelude prelude='{{ template "lib/common/install-prelude.sh" . }}' diff --git a/tests/template/mise-config.bats b/tests/template/mise-config.bats index 9c810cc..0e6d024 100644 --- a/tests/template/mise-config.bats +++ b/tests/template/mise-config.bats @@ -14,14 +14,6 @@ MISE_TEMPLATE="$DOTFILES_ROOT/home/dot_config/mise/config.toml.tmpl" assert_line '"github:microsoft/apm" = "latest"' } -@test "mise config renders tools from mise data groups" { - [ -f "$DOTFILES_ROOT/home/.chezmoidata/mise.yaml" ] - - template_content="$(<"$MISE_TEMPLATE")" - - [[ "$template_content" == *'$.mise.tools'* ]] -} - @test "mise config installs Linear CLI for personal hosts" { run render_chezmoi_template "$MISE_TEMPLATE" "$PERSONAL_DATA" diff --git a/tests/unit/claude-settings.bats b/tests/unit/claude-settings.bats index 9a73349..e9a354c 100644 --- a/tests/unit/claude-settings.bats +++ b/tests/unit/claude-settings.bats @@ -6,13 +6,10 @@ load '../test_helpers/load.bash' SETTINGS="$DOTFILES_ROOT/home/dot_claude/settings.json" -@test "claude settings use current model aliases" { +@test "claude settings pin the model alias" { settings_content="$(<"$SETTINGS")" [[ "$settings_content" == *'"model": "best"'* ]] - [[ "$settings_content" != *'ANTHROPIC_DEFAULT_OPUS_MODEL'* ]] - [[ "$settings_content" != *'ANTHROPIC_DEFAULT_SONNET_MODEL'* ]] - [[ "$settings_content" != *'ANTHROPIC_DEFAULT_HAIKU_MODEL'* ]] } @test "claude settings keep destructive bash commands gated" { diff --git a/tests/unit/lib/common/log.bats b/tests/unit/lib/common/log.bats index 39cdc44..516dee9 100644 --- a/tests/unit/lib/common/log.bats +++ b/tests/unit/lib/common/log.bats @@ -21,12 +21,6 @@ LIB="$DOTFILES_ROOT/home/.chezmoitemplates/lib/common/log.sh" assert_output 'hello world' } -@test "log_info: empty message produces a single newline" { - run sh -c ". '$LIB' && log_info ''" - assert_success - assert_output '' -} - @test "log_info: stays on stdout, not stderr" { run sh -c ". '$LIB' && log_info 'on-stdout' 2>/dev/null" assert_success diff --git a/tests/unit/statusline.bats b/tests/unit/statusline.bats index 40d1368..951a6b8 100644 --- a/tests/unit/statusline.bats +++ b/tests/unit/statusline.bats @@ -22,16 +22,17 @@ FIXTURES="$DOTFILES_ROOT/tests/fixtures/statusline" @test "renders full payload: effort segment when .effort.level is present" { run sh "$STATUSLINE" < "$FIXTURES/full-payload.json" assert_success - assert_line --partial 'max' + assert_line --partial '💪 max' } @test "minimal payload: succeeds and omits rate-limit / cost / effort segments" { - run sh "$STATUSLINE" < "$FIXTURES/minimal.json" + run env -u CLAUDE_CODE_EFFORT_LEVEL sh "$STATUSLINE" < "$FIXTURES/minimal.json" assert_success assert_line --partial 'Sonnet 4.6' assert_line --partial '5%' refute_line --partial '5h' refute_line --partial '$' + refute_line --partial '💪' } @test "worktree fixture: surfaces the worktree name segment" {