mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
The github.com/luxfi/node/errors package shipped with zero tests despite being a public utility surface (sentinel errors, WrappedError context chain, Multi/Join aggregation, retry helpers). This adds 22 tests covering: - WrappedError.Error format (with and without message) - Wrap/WrapWithContext nil pass-through and context preservation - errors.Is / errors.As chain through Wrap (incl. double-wrap) - IsNotFound, IsClosed, IsTimeout helpers - IsTemporary against both sentinel errors and the Temporary() interface - IsPermanent across all permanent sentinels + fmt.Errorf %w chains - GetCategory: wrapped category, sentinel inference, unknown fallback, and the precedence rule (wrapped category beats inferred category) - Multi.Error/Add/Err for 0, 1, and N errors; nil-add ignored - Join nil pass-through and multi-error combination Result: 100.0% statement coverage, race-clean.