Something went wrong. Try again.
A community based topic aggregation platform built on atproto
Something went wrong. Try again.
997 B · 24 lines
Go
at main
12345678910111213141516171819202122232425package main
import ( "testing"
"github.com/bluesky-social/indigo/atproto/lexicon" "github.com/stretchr/testify/require")
// TestIsRecordSchema pins the coverage-summary rule: only record definitions// count toward "record types with test data", so object fixtures routed// through ValidateData cannot inflate the ratio past 100%.func TestIsRecordSchema(t *testing.T) { catalog := lexicon.NewBaseCatalog() require.NoError(t, catalog.LoadDirectory("../../internal/atproto/lexicon"), "the coverage rule cannot be tested without the repository lexicons")
require.True(t, isRecordSchema(catalog, "social.coves.community.removal"), "a record definition must count toward record coverage") require.False(t, isRecordSchema(catalog, "social.coves.moderation.defs#banView"), "an object definition must not count toward record coverage") require.False(t, isRecordSchema(catalog, "social.coves.moderation.defs#missing"), "an unresolvable ref must not count toward record coverage")}