Unit Testing On Flutter Firebase functions
up vote
1
down vote
favorite
Good day I am trying to perform sum unit testing on below function that creates a document on cloud firestore firebase. I have used a function in my app and it creates a document, but I want to write a test.dart file that performs unit testing for the below fuction and prints some output even on the console for verifications But I think I am not writing my Test.dart in proper way.I have get an error Function in file createdatabase.dart Future<dynamic> createDoc(dataMap,collection) async { final TransactionHandler createTransaction = (Transaction tx) async { final DocumentSnapshot ds = await tx.get(db.collection(collection).document()); final Map<String, dynamic> result = {}; result.addAll(dataMap); result['id'] = ds.documentID; await tx.set(ds.referenc...