blob: 8a57cbc5a11f19bdc5a4ccb7403caf40bc7af11f [file] [edit]
@TestOn('vm')
library;
import 'package:test/test.dart';
import 'package:timezone/timezone.dart';
void main() {
group('Without initializing timezone database', () {
test('Can still construct TZDateTime.utc', () {
TZDateTime.utc(2019);
});
test('getLocation throws $LocationNotFoundException with message about the '
'database not being initialized', () {
expect(
() => getLocation('America/New_York'),
throwsA(
const TypeMatcher<LocationNotFoundException>().having(
(e) => e.msg,
'msg',
contains('database'),
),
),
);
});
});
}