@unrdf/test-utils
v5.0.1
Published
Testing utilities for UNRDF development
Readme
@unrdf/test-utils
Testing utilities, fixtures, and helpers for UNRDF development.
Status: Internal use only (private package)
Purpose
This package provides shared testing infrastructure for all UNRDF packages:
- Test fixtures (sample RDF data, SPARQL queries, SHACL shapes)
- Helper functions for creating test stores and data
- Common test setup and configuration
- Mock implementations for testing
Installation
This is a private package. Use only in test environments:
pnpm --filter @unrdf/test-utils installUsage
Creating a Test Store
import { createTestStore } from '@unrdf/test-utils';
const store = await createTestStore();
// Store is ready for testingLoading Test Fixtures
import { loadFixture } from '@unrdf/test-utils';
const sampleGraph = loadFixture('sample-graph.ttl');
const shapes = loadFixture('shapes.ttl');
store.load(sampleGraph, 'text/turtle');Test Helpers
import {
createTestStore,
loadFixture,
assertQueryResults,
assertValidShape
} from '@unrdf/test-utils';Contents
src/
├── store.mjs # Test store creation helpers
├── fixtures.mjs # Fixture loading utilities
├── assertions.mjs # Custom test assertions
└── index.mjs # Main exportsSee Also
- TESTING-STRATEGY.md - Testing guide
- LOCAL-DEVELOPMENT.md - Dev setup
- Individual package
test/directories for usage examples
