Files
HackBrowserData/internal/log/log_test.go
T
Roger 2e7ee3c69f test: tidy misplaced, stale, and redundant tests (#691)
Tests now sit beside the code they cover; ones a golden or another test already pins are gone, and core tests gain the assertions a real regression would trip.
2026-11-09 17:25:37 +08:00

16 lines
359 B
Go

package log
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSetVerbose(t *testing.T) {
t.Cleanup(func() { defaultLogger.setLevel(infoLevel) })
assert.False(t, defaultLogger.enabled(debugLevel), "Debug must be suppressed by default")
SetVerbose()
assert.True(t, defaultLogger.enabled(debugLevel), "SetVerbose must enable Debug")
}