It works baby, seems like timing could be improved or something, but it freakin works
This commit is contained in:
@@ -1,8 +1,37 @@
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:mumbullet/mumbullet.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('calculate', () {
|
||||
expect(calculate(), 42);
|
||||
group('LogManager', () {
|
||||
test('should initialize with console logging', () {
|
||||
final logManager = LogManager.getInstance();
|
||||
|
||||
// This test just verifies that initialization doesn't throw
|
||||
expect(() => logManager.initialize(
|
||||
level: Level.INFO,
|
||||
logToConsole: true,
|
||||
), returnsNormally);
|
||||
|
||||
logManager.close();
|
||||
});
|
||||
|
||||
test('should log messages at different levels', () {
|
||||
final logManager = LogManager.getInstance();
|
||||
logManager.initialize(
|
||||
level: Level.ALL,
|
||||
logToConsole: true,
|
||||
);
|
||||
|
||||
// This test just verifies that logging doesn't throw
|
||||
expect(() {
|
||||
logManager.debug('Debug message');
|
||||
logManager.info('Info message');
|
||||
logManager.warning('Warning message');
|
||||
logManager.error('Error message');
|
||||
}, returnsNormally);
|
||||
|
||||
logManager.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user