Commit graph

8 commits

Author SHA1 Message Date
Tiara Rodney
37fd6194c7
test(handler): add tests for LocalStorageHandler 2026-03-14 04:57:32 +01:00
Tiara Rodney
5022a1e0bc
test(manager): add tests for manager assignment and propagation 2026-03-14 02:32:20 +01:00
Tiara Rodney
216d2b5892
test(handler): add tests for StreamHandler, ConsoleHandler, StderrHandler
Cover StreamHandler emit to custom Writable, default stream fallback,
and error handling on write failure. Cover ConsoleHandler level-to-
method mapping (error/warn/log). Cover StderrHandler console.error
output. Cover FileHandler browser rejection. Cover Handler base class
handleError not throwing.
2026-03-14 00:00:34 +01:00
Tiara Rodney
3422cfb799
test(formatter): add tests for formatting, formatTime, formatError
Cover %-style substitution with %(name)s, %(levelno)d, %(levelname)s,
multiple placeholders, unknown field errors, asctime population,
ISO8601 and custom datefmt time formatting, Error.stack formatting,
usesTime detection, and LogRecord.getMessage with %s arg substitution.
2026-03-13 23:22:10 +01:00
Tiara Rodney
d95c8d37da
test(logger): add tests for info, warning, error, and critical methods 2026-03-13 22:56:01 +01:00
Tiara Rodney
3b6b116b00
test: add unit tests for handler, logger, manager, and config
Cover Handler property accessors, format delegation, emit contract,
and close lifecycle. Cover Logger level methods, isEnabledFor caching,
manager property assignment, handler management, debug invocation,
and makeRecord extra key collision. Cover Manager getLogger hierarchy
setup, placeholder fixup, disable level, and loggerClass validation.
Cover basicConfig option handling, force flag, mutual exclusion of
stream/filename/handlers, and formatter assignment.
2026-03-13 22:49:12 +01:00
Tiara Rodney
25ec89c3b4
fix: correct jest roots and test import path 2026-03-13 22:38:41 +01:00
Rodney, Tiara
31f2d6e6f9
chore: move existing tests to sub-directory
introducing sub-directories for each type of tests, so that they're easier to
seperate.
2025-05-01 22:50:34 +02:00