Files
skillshare/tests/integration/log_project_test.go
T
Willie cfa6d4017b fix(docs,test): add replit badge and project-mode integration tests
Add missing replit badge + id anchor in supported-targets.md.
Add project-mode integration tests for audit, check, diff, and log
commands to close gaps found in codebase audit.
2026-02-25 07:02:54 +08:00

42 lines
955 B
Go

//go:build !online
package integration
import (
"testing"
"skillshare/internal/testutil"
)
func TestLogProject_ShowsEmpty(t *testing.T) {
sb := testutil.NewSandbox(t)
defer sb.Cleanup()
projectRoot := sb.SetupProjectDir("claude")
result := sb.RunCLIInDir(projectRoot, "log", "-p")
result.AssertSuccess(t)
result.AssertOutputContains(t, "No operation")
}
func TestLogProject_AfterSync(t *testing.T) {
sb := testutil.NewSandbox(t)
defer sb.Cleanup()
projectRoot := sb.SetupProjectDir("claude")
// Create a skill so sync has something to do
sb.CreateProjectSkill(projectRoot, "log-test-skill", map[string]string{
"SKILL.md": "# Log Test Skill",
})
// Run sync first to generate a log entry
syncResult := sb.RunCLIInDir(projectRoot, "sync", "-p")
syncResult.AssertSuccess(t)
// Check log shows the sync entry
result := sb.RunCLIInDir(projectRoot, "log", "-p")
result.AssertSuccess(t)
result.AssertOutputContains(t, "sync")
}