Codebase list golang-github-gobuffalo-packr / f6f50374-c7e0-4d5e-8972-f772ebe53365/main builder / visitor_test.go
f6f50374-c7e0-4d5e-8972-f772ebe53365/main

Tree @f6f50374-c7e0-4d5e-8972-f772ebe53365/main (Download .tar.gz)

visitor_test.go @f6f50374-c7e0-4d5e-8972-f772ebe53365/mainraw · history · blame

package builder

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func Test_Visitor(t *testing.T) {
	r := require.New(t)
	v := newVisitor("../example/example.go")
	r.NoError(v.Run())

	r.Equal("example", v.Package)
	r.Len(v.Errors, 0)
	r.Len(v.Boxes, 7)
	r.Equal([]string{"./assets", "./bar", "./constant", "./foo", "./sf", "./templates", "./variable"}, v.Boxes)
}