Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions tests/template/agent-instructions.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
16 changes: 0 additions & 16 deletions tests/template/darwin-install-scripts.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" . }}'
Expand Down
8 changes: 0 additions & 8 deletions tests/template/mise-config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
5 changes: 1 addition & 4 deletions tests/unit/claude-settings.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/lib/common/log.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/statusline.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
Loading