diff --git a/packages/ying-shared/test/logging/logger_test.dart b/packages/ying-shared/test/logging/logger_test.dart index ebcd9f2..6163f2e 100644 --- a/packages/ying-shared/test/logging/logger_test.dart +++ b/packages/ying-shared/test/logging/logger_test.dart @@ -96,5 +96,18 @@ void main() { }, prints("[01.01.2024] [00:00:00.00] [TRACE] [unit] unit-test\n")); }); }); + + test('it should not print anything when the LogLevel is too low', () { + withClock(Clock.fixed(DateTime(2024)), () { + expect(() { + final logger = Logger.withSimpleName("unit", LogLevel.info); + + logger.trace("unit-test"); + }, + isNot( + prints("[01.01.2024] [00:00:00.00] [TRACE] [unit] unit-test\n"), + )); + }); + }); }); }