Commit Graph
6 Commits
Author SHA1 Message Date
Dmitry Ng 6753e2b3d6 test(langfuse): strengthen noop tests with safer assertions 2026-04-11 14:02:21 +03:00
Mason b323a8ace0 test: add unit tests for langfuse context and noop observer (#242)
* test: add unit tests for langfuse context and noop observer

Add tests for observation context put/get round-trip, nested context
override behavior, and noop observer: trace ID generation, parent
inheritance, explicit override, Shutdown, ForceFlush, and enqueue.

* test: add edge case tests for noop observer branch coverage

Add two missing branch tests: explicit ObservationID with no parent
context (verifies new trace generation), and explicit TraceID with
parent (verifies observation ID is NOT inherited when trace is explicit).
2026-04-11 14:43:36 +04:00
Dmitry Ng 10e77fb546 test(langfuse): fix float assertions and strengthen type checks 2026-04-11 13:40:15 +03:00
mason5052 161b122d91 test: add getCurrentTimeRef test and strengthen ModelParameters assertions
Add missing TestGetCurrentTimeRef coverage. Replace shallow key-presence
checks in ModelParameters.ToLangfuse tests with full value assertions:
verify MapValue string/integer/boolean/list payloads for inf default,
explicit max_tokens, formatted floats, json mode, and stop words.
2026-04-08 11:29:00 -04:00
mason5052 cad6b01ebb test: add unit tests for langfuse helpers package
Add comprehensive unit tests for all utility functions in the langfuse
helpers package: mergeMaps, ObservationLevel, GenerationUsageUnit,
GenerationUsage, ModelParameters, GetLangchainModelParameters, trace/span
ID generation, time helpers, and pointer helpers.
2026-04-08 09:44:01 -04:00
Dmitry Ng b90ea4711e repo final state 2026-03-26 06:16:07 +03:00