Repository inventory

lookatitude/beluga-ai

Skills indexed from this repository, with install-style signals scoped to the repo.
11 skills75 GitHub stars0 weekly installsGoGitHubOwner profile

Overview

This skill collects Go testing patterns and pragmatic conventions for Beluga AI v2 projects. It provides concrete examples for table-driven tests, stream cancellation, mocks, integration tags, and benchmarks to speed reliable test development. Use it to standardize tests, surface common pitfalls, and ensure consistent test layout and assertions.

How this skill works

The skill inspects common test scenarios and supplies short, actionable examples: table-driven unit tests, stream handling with context cancellation, and bench/test build tags. It documents mock placement and structure, preferred assertion libraries, compile-time interface checks, and mandatory test cases to cover error paths and empty inputs. Patterns are minimal and meant to be copied into *_test.go files alongside source code.

When to use it

  • Writing unit tests for models and handlers
  • Adding stream tests that must handle context cancellation
  • Creating mocks with injected errors and call counting
  • Authoring integration tests or benchmarks
  • Enforcing compile-time interface conformance

Best practices

  • Place tests in *_test.go files next to the code they exercise, not in separate directories
  • Use table-driven tests for multiple scenarios and t.Run for subtests
  • Favor testify/require for fatal assertions and testify/assert for non-fatal checks
  • Always test error paths, nil/empty inputs, and context cancellation for streams
  • Use //go:build integration for integration tests and *_integration_test.go naming
  • For benchmarks include b.ReportAllocs() and b.RunParallel() when appropriate

Example use cases

  • Unit test a Generate function with a table of inputs and expected outputs
  • Test a streaming API that must cancel correctly using context.WithCancel
  • Create a package mock with configurable function fields, error injection, and call counters under internal/testutil/mock<package>/
  • Add a compile-time interface conformance check: var _ Interface = (*Impl)(nil)
  • Write integration tests guarded by the integration build tag and separate benchmark files for performance

FAQ

Keep mocks under internal/testutil/mock<package>/ with function fields, error injection, and counters.

What assertion libraries to use?

Use testify/require for fatal checks and testify/assert for non-fatal assertions.

11 skills

go-testing
Debugging

This skill helps you apply Go testing patterns to write robust tests, mocks, and benchmarks with clear structure and coverage.

GoIntegration TestsPerformanceTesting+2
go-framework
Backend

This skill helps design Go framework architecture by applying registry, lifecycle, and middleware patterns to packages and providers.

DesignGoGo
streaming-patterns
Api

This skill helps implement streaming patterns in Go using iter.Seq2, enabling backpressure-aware streaming, transforms, and efficient data flow.

BackendGoPerformanceGo
website-development
Accessibility

This skill helps you implement website development patterns using Astro 5, Tailwind, and Starlight to build responsive, accessible UI.

AstroFrontendPerformanceTailwind+2
create_provider
Ai

This skill guides you through adding a new provider (LLM, VectorStore, etc.) to Beluga AI with directory layout, interface implementation, and testing.

BackendCode ReviewDocsTesting+2
create_test_suite
Debugging

This skill guides you to design a comprehensive Beluga AI Go test suite with mocks, performance tests, and OTEL validation.

Integration TestsObservabilityPerformanceTesting+2
design_component
Backend

This skill guides you in designing a new Go component following ISP, DIP, and SRP for clean architecture and extensibility.

Code ReviewDesignObservabilityTesting+1
review_architecture
Ai

This skill helps you enforce architectural compliance by guiding systematic reviews against Beluga AI patterns and layer boundaries.

Code ReviewDesignPlanningRefactor+1
create_package
Api

This skill guides you to create a standardized Go package in Beluga AI, including structure, interfaces, metrics, and validation.

BackendDocsLintingObservability+2
research_topic
Analytics

This skill helps researchers explore Go codebase topics, document patterns, and provide evidence-based recommendations for design decisions.

BackendCode ReviewDocsResearch+2
implement_feature
Api

This skill guides end-to-end feature implementation in Beluga AI, enforcing ISP patterns, configuration, metrics, and robust error handling.

BackendTestingGo
More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational