profilecenter_test.go 287 B

12345678910111213141516
  1. package prof
  2. import (
  3. "testing"
  4. "time"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestReport(t *testing.T) {
  8. once.Do(func() {})
  9. assert.NotContains(t, generateReport(), "foo")
  10. report("foo", time.Second)
  11. assert.Contains(t, generateReport(), "foo")
  12. report("foo", time.Second)
  13. }