package scrape import ( "testing" "github.com/stretchr/testify/require" ) func TestQuery(t *testing.T) { html := `

Page Title

First post
Second post
Third post
` title := Query(Doc(html), "#title") require.Equal(t, title, "Page Title") }