@@ -27,15 +27,15 @@ void runDocumentReferenceTests() {
2727 group (
2828 'DocumentReference.snapshots()' ,
2929 () {
30- testWidgets ('returns a [Stream]' , (_ ) async {
30+ test ('returns a [Stream]' , () async {
3131 DocumentReference <Map <String , dynamic >> document =
3232 await initializeTest ('document-snapshot' );
3333 Stream <DocumentSnapshot <Map <String , dynamic >>> stream =
3434 document.snapshots ();
3535 expect (stream, isA <Stream <DocumentSnapshot <Map <String , dynamic >>>>());
3636 });
3737
38- testWidgets ('can be reused' , (_ ) async {
38+ test ('can be reused' , () async {
3939 final foo = await initializeTest ('foo' );
4040
4141 final snapshot = foo.snapshots ();
@@ -66,7 +66,7 @@ void runDocumentReferenceTests() {
6666 );
6767 });
6868
69- testWidgets ('listens to a single response' , (_ ) async {
69+ test ('listens to a single response' , () async {
7070 DocumentReference <Map <String , dynamic >> document =
7171 await initializeTest ('document-snapshot' );
7272 Stream <DocumentSnapshot <Map <String , dynamic >>> stream =
@@ -88,7 +88,7 @@ void runDocumentReferenceTests() {
8888 });
8989 });
9090
91- testWidgets ('listens to a single response from cache' , (_ ) async {
91+ test ('listens to a single response from cache' , () async {
9292 DocumentReference <Map <String , dynamic >> document =
9393 await initializeTest ('document-snapshot' );
9494 Stream <DocumentSnapshot <Map <String , dynamic >>> stream =
@@ -110,7 +110,7 @@ void runDocumentReferenceTests() {
110110 });
111111 });
112112
113- testWidgets ('listens to a document from cache' , (_ ) async {
113+ test ('listens to a document from cache' , () async {
114114 DocumentReference <Map <String , dynamic >> document =
115115 await initializeTest ('document-snapshot-cache' );
116116 await document.set ({'foo' : 'bar' });
@@ -134,7 +134,7 @@ void runDocumentReferenceTests() {
134134 });
135135 });
136136
137- testWidgets ('listens to multiple documents' , (_ ) async {
137+ test ('listens to multiple documents' , () async {
138138 DocumentReference <Map <String , dynamic >> doc1 =
139139 await initializeTest ('document-snapshot-1' );
140140 DocumentReference <Map <String , dynamic >> doc2 =
@@ -150,7 +150,7 @@ void runDocumentReferenceTests() {
150150 await expectLater (value2, completion ('value2' ));
151151 });
152152
153- testWidgets ('listens to a multiple changes response' , (_ ) async {
153+ test ('listens to a multiple changes response' , () async {
154154 DocumentReference <Map <String , dynamic >> document =
155155 await initializeTest ('document-snapshot-multiple' );
156156 Stream <DocumentSnapshot <Map <String , dynamic >>> stream =
@@ -197,7 +197,7 @@ void runDocumentReferenceTests() {
197197 );
198198 });
199199
200- testWidgets ('listeners throws a [FirebaseException]' , (_ ) async {
200+ test ('listeners throws a [FirebaseException]' , () async {
201201 DocumentReference <Map <String , dynamic >> document =
202202 firestore.doc ('not-allowed/document' );
203203 Stream <DocumentSnapshot <Map <String , dynamic >>> stream =
@@ -220,7 +220,7 @@ void runDocumentReferenceTests() {
220220 );
221221
222222 group ('DocumentReference.delete()' , () {
223- testWidgets ('delete() deletes a document' , (_ ) async {
223+ test ('delete() deletes a document' , () async {
224224 DocumentReference <Map <String , dynamic >> document =
225225 await initializeTest ('document-delete' );
226226 await document.set ({
@@ -233,9 +233,9 @@ void runDocumentReferenceTests() {
233233 expect (snapshot2.exists, isFalse);
234234 });
235235
236- testWidgets (
236+ test (
237237 'throws a [FirebaseException] on error' ,
238- (_ ) async {
238+ () async {
239239 DocumentReference <Map <String , dynamic >> document =
240240 firestore.doc ('not-allowed/document' );
241241
@@ -257,7 +257,7 @@ void runDocumentReferenceTests() {
257257 });
258258
259259 group ('DocumentReference.get()' , () {
260- testWidgets ('gets a document from server' , (_ ) async {
260+ test ('gets a document from server' , () async {
261261 DocumentReference <Map <String , dynamic >> document =
262262 await initializeTest ('document-get-server' );
263263 await document.set ({'foo' : 'bar' });
@@ -267,9 +267,9 @@ void runDocumentReferenceTests() {
267267 expect (snapshot.metadata.isFromCache, isFalse);
268268 });
269269
270- testWidgets (
270+ test (
271271 'gets a document from cache' ,
272- (_ ) async {
272+ () async {
273273 DocumentReference <Map <String , dynamic >> document =
274274 await initializeTest ('document-get-cache' );
275275 await document.set ({'foo' : 'bar' });
@@ -281,9 +281,9 @@ void runDocumentReferenceTests() {
281281 skip: kIsWeb,
282282 );
283283
284- testWidgets (
284+ test (
285285 'throws a [FirebaseException] on error' ,
286- (_ ) async {
286+ () async {
287287 DocumentReference <Map <String , dynamic >> document =
288288 firestore.doc ('not-allowed/document' );
289289
@@ -303,7 +303,7 @@ void runDocumentReferenceTests() {
303303 });
304304
305305 group ('DocumentReference.set()' , () {
306- testWidgets ('sets data' , (_ ) async {
306+ test ('sets data' , () async {
307307 DocumentReference <Map <String , dynamic >> document =
308308 await initializeTest ('document-set' );
309309 await document.set ({'foo' : 'bar' });
@@ -314,7 +314,7 @@ void runDocumentReferenceTests() {
314314 expect (snapshot2.data (), equals ({'bar' : 'baz' }));
315315 });
316316
317- testWidgets ('set() merges data' , (_ ) async {
317+ test ('set() merges data' , () async {
318318 DocumentReference <Map <String , dynamic >> document =
319319 await initializeTest ('document-set-merge' );
320320 await document.set ({'foo' : 'bar' });
@@ -326,9 +326,9 @@ void runDocumentReferenceTests() {
326326 expect (snapshot2.data (), equals ({'foo' : 'ben' , 'bar' : 'baz' }));
327327 });
328328
329- testWidgets (
329+ test (
330330 'set() merges fields' ,
331- (_ ) async {
331+ () async {
332332 DocumentReference <Map <String , dynamic >> document =
333333 await initializeTest ('document-set-merge-fields' );
334334 Map <String , dynamic > initialData = {
@@ -363,9 +363,9 @@ void runDocumentReferenceTests() {
363363 },
364364 );
365365
366- testWidgets (
366+ test (
367367 'throws a [FirebaseException] on error' ,
368- (_ ) async {
368+ () async {
369369 DocumentReference <Map <String , dynamic >> document =
370370 firestore.doc ('not-allowed/document' );
371371
@@ -383,7 +383,7 @@ void runDocumentReferenceTests() {
383383 },
384384 );
385385
386- testWidgets ('set and return all possible datatypes' , (_ ) async {
386+ test ('set and return all possible datatypes' , () async {
387387 DocumentReference <Map <String , dynamic >> document =
388388 await initializeTest ('document-types' );
389389
@@ -453,7 +453,7 @@ void runDocumentReferenceTests() {
453453 });
454454
455455 group ('DocumentReference.update()' , () {
456- testWidgets ('updates data' , (_ ) async {
456+ test ('updates data' , () async {
457457 DocumentReference <Map <String , dynamic >> document =
458458 await initializeTest ('document-update' );
459459 await document.set ({'foo' : 'bar' });
@@ -464,7 +464,7 @@ void runDocumentReferenceTests() {
464464 expect (snapshot2.data (), equals ({'foo' : 'bar' , 'bar' : 'baz' }));
465465 });
466466
467- testWidgets ('updates nested data using dots' , (_ ) async {
467+ test ('updates nested data using dots' , () async {
468468 DocumentReference <Map <String , dynamic >> document =
469469 await initializeTest ('document-update-field-path' );
470470 await document.set ({
@@ -488,7 +488,7 @@ void runDocumentReferenceTests() {
488488 );
489489 });
490490
491- testWidgets ('updates nested data using FieldPath' , (_ ) async {
491+ test ('updates nested data using FieldPath' , () async {
492492 DocumentReference <Map <String , dynamic >> document =
493493 await initializeTest ('document-update-field-path' );
494494 await document.set ({
@@ -514,8 +514,7 @@ void runDocumentReferenceTests() {
514514 );
515515 });
516516
517- testWidgets ('updates nested data containing a dot using FieldPath' ,
518- (_) async {
517+ test ('updates nested data containing a dot using FieldPath' , () async {
519518 DocumentReference <Map <String , dynamic >> document =
520519 await initializeTest ('document-update-field-path' );
521520 await document.set ({'foo.bar' : 'baz' });
@@ -535,9 +534,9 @@ void runDocumentReferenceTests() {
535534 );
536535 });
537536
538- testWidgets (
537+ test (
539538 'throws if document does not exist' ,
540- (_ ) async {
539+ () async {
541540 DocumentReference <Map <String , dynamic >> document =
542541 await initializeTest ('document-update-not-exists' );
543542 try {
@@ -555,9 +554,9 @@ void runDocumentReferenceTests() {
555554 });
556555
557556 group ('withConverter' , () {
558- testWidgets (
557+ test (
559558 'set/snapshot/get' ,
560- (_ ) async {
559+ () async {
561560 final foo = await initializeTest ('foo' );
562561 final fooConverter = foo.withConverter <int >(
563562 fromFirestore: (snapshots, _) => snapshots.data ()! ['value' ]! as int ,
0 commit comments