github.com/octohelm/cuemod@v0.9.4/pkg/cueify/golang/extractor_test.go (about)

     1  package golang_test
     2  
     3  import (
     4  	"context"
     5  	"os"
     6  	"testing"
     7  
     8  	"github.com/go-courier/logr/slog"
     9  
    10  	"github.com/octohelm/cuemod/pkg/cueify"
    11  
    12  	"github.com/go-courier/logr"
    13  	"github.com/onsi/gomega"
    14  )
    15  
    16  func TestExtractor(t *testing.T) {
    17  	ctx := logr.WithLogger(context.Background(), slog.Logger(slog.Default()))
    18  
    19  	_ = os.RemoveAll("./testdata/gen")
    20  
    21  	err := cueify.ExtractToDir(
    22  		ctx,
    23  		"go",
    24  		"./testdata/src",
    25  		"./testdata/gen",
    26  	)
    27  
    28  	gomega.NewWithT(t).Expect(err).To(gomega.BeNil())
    29  }