dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+25 -12
View File
@@ -22,18 +22,27 @@ void main() {
});
test('SocketException maps to NetworkException message', () {
expect(errorToUserMessage(const SocketException('boom')),
const NetworkException().userMessage);
expect(
errorToUserMessage(const SocketException('boom')),
const NetworkException().userMessage,
);
});
test('TimeoutException maps to the timeout-specific NetworkException message', () {
expect(errorToUserMessage(TimeoutException('slow')),
NetworkException.timeout().userMessage);
});
test(
'TimeoutException maps to the timeout-specific NetworkException message',
() {
expect(
errorToUserMessage(TimeoutException('slow')),
NetworkException.timeout().userMessage,
);
},
);
test('http.ClientException maps to NetworkException message', () {
expect(errorToUserMessage(http.ClientException('failed')),
const NetworkException().userMessage);
expect(
errorToUserMessage(http.ClientException('failed')),
const NetworkException().userMessage,
);
});
test('HandshakeException maps to a TLS-specific message', () {
@@ -43,8 +52,10 @@ void main() {
});
test('FormatException maps to ParseException message', () {
expect(errorToUserMessage(const FormatException('bad json')),
const ParseException().userMessage);
expect(
errorToUserMessage(const FormatException('bad json')),
const ParseException().userMessage,
);
});
test('ApiError surfaces only the first line of its message', () {
@@ -58,8 +69,10 @@ void main() {
});
test('unknown error type falls back', () {
expect(errorToUserMessage(StateError('weird')),
contains('Etwas ist schiefgelaufen'));
expect(
errorToUserMessage(StateError('weird')),
contains('Etwas ist schiefgelaufen'),
);
});
test('custom fallback overrides the default', () {