Skip to content

Commit 69fe063

Browse files
authored
fix(dart_frog): comply with new analysis rules (#940)
1 parent fa91d2b commit 69fe063

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

packages/dart_frog/test/src/body_parsers/form_data_test.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Actual MIME type: "application/json"
4444
test('returns empty form data when body is empty', () async {
4545
final formData = await parseFormData(
4646
headers: {
47-
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType
47+
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType,
4848
},
4949
body: () async => '',
5050
bytes: () async* {},
@@ -59,7 +59,7 @@ Actual MIME type: "application/json"
5959
'when body contains single key/value', () async {
6060
final formData = await parseFormData(
6161
headers: {
62-
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType
62+
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType,
6363
},
6464
body: () async => 'foo=bar',
6565
bytes: () async* {},
@@ -74,7 +74,7 @@ Actual MIME type: "application/json"
7474
'when body contains multiple key/values', () async {
7575
final formData = await parseFormData(
7676
headers: {
77-
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType
77+
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType,
7878
},
7979
body: () async => 'foo=bar&bar=baz',
8080
bytes: () async* {},
@@ -89,7 +89,7 @@ Actual MIME type: "application/json"
8989
final formData = await parseFormData(
9090
headers: {
9191
HttpHeaders.contentTypeHeader:
92-
'multipart/form-data; boundary=testing'
92+
'multipart/form-data; boundary=testing',
9393
},
9494
body: () async => '',
9595
bytes: () async* {
@@ -108,7 +108,7 @@ Actual MIME type: "application/json"
108108
final formData = await parseFormData(
109109
headers: {
110110
HttpHeaders.contentTypeHeader:
111-
'multipart/form-data; boundary=testing'
111+
'multipart/form-data; boundary=testing',
112112
},
113113
body: () async => '',
114114
bytes: () async* {
@@ -133,7 +133,7 @@ Actual MIME type: "application/json"
133133
'my_file.txt',
134134
ContentType.text,
135135
'file content',
136-
)
136+
),
137137
}),
138138
);
139139
});
@@ -142,7 +142,7 @@ Actual MIME type: "application/json"
142142
final formData = await parseFormData(
143143
headers: {
144144
HttpHeaders.contentTypeHeader:
145-
'multipart/form-data; boundary=testing'
145+
'multipart/form-data; boundary=testing',
146146
},
147147
body: () async => '',
148148
bytes: () async* {
@@ -180,7 +180,7 @@ Actual MIME type: "application/json"
180180
'my_other_file.txt',
181181
ContentType.text,
182182
'file content',
183-
)
183+
),
184184
}),
185185
);
186186
});
@@ -215,7 +215,7 @@ Actual MIME type: "application/json"
215215
group('$UploadedFile', () {
216216
test('toString', () {
217217
final byteStream = Stream.fromIterable([
218-
[1, 2, 3, 4]
218+
[1, 2, 3, 4],
219219
]);
220220
final file = UploadedFile('name', ContentType.text, byteStream);
221221

@@ -227,7 +227,7 @@ Actual MIME type: "application/json"
227227

228228
test('readAsBytes', () async {
229229
final byteStream = Stream.fromIterable([
230-
[1, 2, 3, 4]
230+
[1, 2, 3, 4],
231231
]);
232232
final file = UploadedFile('name', ContentType.text, byteStream);
233233

@@ -239,14 +239,14 @@ Actual MIME type: "application/json"
239239

240240
test('openRead', () {
241241
final byteStream = Stream.fromIterable([
242-
[1, 2, 3, 4]
242+
[1, 2, 3, 4],
243243
]);
244244
final file = UploadedFile('name', ContentType.text, byteStream);
245245

246246
expect(
247247
file.openRead(),
248248
emitsInOrder([
249-
[1, 2, 3, 4]
249+
[1, 2, 3, 4],
250250
]),
251251
);
252252
});
@@ -291,7 +291,7 @@ class MultiPartFormData {
291291
part.content,
292292
],
293293
'--testing--',
294-
''
294+
'',
295295
].join('\r\n'),
296296
);
297297
}

packages/dart_frog/test/src/request_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void main() {
149149

150150
group('formData', () {
151151
final contentTypeFormUrlEncoded = {
152-
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType
152+
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType,
153153
};
154154

155155
test('throws StateError on invalid content-type', () async {

packages/dart_frog/test/src/response_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void main() {
111111

112112
group('formData', () {
113113
final contentTypeFormUrlEncoded = {
114-
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType
114+
HttpHeaders.contentTypeHeader: formUrlEncodedContentType.mimeType,
115115
};
116116

117117
test('throws StateError on invalid content-type', () async {

0 commit comments

Comments
 (0)