testing library

Test doubles and helpers for code built on agentic_core.

Kept in a separate entry point so that production builds never pull in test scaffolding, while packages that build on the framework — including third-party tools and providers — can reuse the same doubles the framework tests itself with.

import 'package:agentic_core/testing.dart';

final clock = FakeClock(autoAdvance: true);
final ids = SequentialIdGenerator(prefix: 'evt-');
final logs = InMemoryLogSink();

Classes

FakeClock
A manually or automatically advanced clock.
InMemoryLogSink
Buffers records in memory.
InMemorySpanExporter
Retains spans in memory.
SequentialIdGenerator
Produces predictable identifiers of the form <prefix><n>.

Functions

debugCreateToken() CancellationToken
Test-only access to construct a bare token.