mirror of
https://github.com/tw93/Mole.git
synced 2026-02-08 10:19:20 +00:00
feat: overhaul quality checks and expand test suite for clean and optimize features
This commit is contained in:
@@ -46,24 +46,18 @@ setup() {
|
||||
}
|
||||
|
||||
@test "touchid status reports current configuration" {
|
||||
# Don't test actual Touch ID config (system-dependent, may trigger prompts)
|
||||
# Just verify the command exists and can run
|
||||
run env HOME="$HOME" "$PROJECT_ROOT/mole" touchid status
|
||||
[ "$status" -eq 0 ]
|
||||
# Should output either "enabled" or "not configured" message
|
||||
[[ "$output" == *"Touch ID"* ]]
|
||||
}
|
||||
|
||||
@test "mo optimize command is recognized" {
|
||||
# Test that optimize command exists without actually running it
|
||||
# Running full optimize in tests is too slow (waits for sudo, runs health checks)
|
||||
run bash -c "grep -q '\"optimize\")' '$PROJECT_ROOT/mole'"
|
||||
[ "$status" -eq 0 ]
|
||||
}
|
||||
|
||||
@test "mo analyze binary is valid" {
|
||||
if [[ -f "$PROJECT_ROOT/bin/analyze-go" ]]; then
|
||||
# Verify binary is executable and valid Universal Binary
|
||||
[ -x "$PROJECT_ROOT/bin/analyze-go" ]
|
||||
run file "$PROJECT_ROOT/bin/analyze-go"
|
||||
[[ "$output" == *"Mach-O"* ]] || [[ "$output" == *"executable"* ]]
|
||||
|
||||
Reference in New Issue
Block a user