sourcegraph/internal/codeintel/context/split_test.go
Noah S-C 9333f8f283
codeintel: consolidate enterprise & oss codeintel packages (#54431)
Movin enterprise codeintel stuff (and ~two others that had to be dragged
along) out of `enterprise/internal` and into `internal` as part of the
shift towards enterprise-only

## Test plan

Successfully built frontend with bazel, CI will check the rest
😎 no logic changed, just shufflin things around
2023-07-05 14:58:41 +01:00

24 lines
340 B
Go

package context
import (
"testing"
"github.com/hexops/autogold/v2"
)
func TestSplitIntoEmbeddableChunks(t *testing.T) {
content := `Line
Line
Line
Line
Line
Line
Line
Line
`
chunks := SplitIntoEmbeddableChunks(content, "", SplitOptions{ChunkTokensThreshold: 4, ChunkEarlySplitTokensThreshold: 1})
autogold.ExpectFile(t, chunks)
}