github.com/lingyao2333/mo-zero@v1.4.1/core/prof/profilecenter_test.go (about)

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