Skip to content

Commit

Permalink
chore: fix analyse issues
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Nov 19, 2024
1 parent e0d1b4c commit 86c4341
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import 'web_snapshot_listeners.dart';
bool kUseFirestoreEmulator = true;

void main() {
IntegrationtestFlutterBinding.ensureInitialized();
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

group('cloud_firestore', () {
setUpAll(() async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void runInstanceTests() {

int inSyncCount = 0;

insync = firestore.snapshotsInSync().listen(() {
insync = firestore.snapshotsInSync().listen((_) {
controller.add('insync=$inSyncCount');
inSyncCount++;
});
Expand Down Expand Up @@ -83,7 +83,7 @@ void runInstanceTests() {

// Set some data while offline
// ignore: unawaited_futures
documentReference.set({'foo': 'baz'}).then(() async {
documentReference.set({'foo': 'baz'}).then((_) async {
// Only when back online will this trigger
controller.add(true);
});
Expand Down Expand Up @@ -264,15 +264,14 @@ void runInstanceTests() {
skip: defaultTargetPlatform == TargetPlatform.windows,
);

test('setLoggingEnabled should resolve without issue',
(widgetTester) async {
test('setLoggingEnabled should resolve without issue', () async {
await FirebaseFirestore.setLoggingEnabled(true);
await FirebaseFirestore.setLoggingEnabled(false);
});

test(
'Settings() - `persistenceEnabled` & `cacheSizeBytes` with acceptable number',
(widgetTester) async {
() async {
FirebaseFirestore.instance.settings =
const Settings(persistenceEnabled: true, cacheSizeBytes: 10000000);
// Used to trigger settings
Expand All @@ -286,7 +285,7 @@ void runInstanceTests() {

test(
'Settings() - `persistenceEnabled` & `cacheSizeBytes` with `Settings.CACHE_SIZE_UNLIMITED`',
(widgetTester) async {
() async {
FirebaseFirestore.instance.settings = const Settings(
persistenceEnabled: true,
cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED,
Expand All @@ -301,7 +300,7 @@ void runInstanceTests() {
});

test('Settings() - `persistenceEnabled` & without `cacheSizeBytes`',
(widgetTester) async {
() async {
FirebaseFirestore.instance.settings =
const Settings(persistenceEnabled: true);
// Used to trigger settings
Expand All @@ -314,7 +313,7 @@ void runInstanceTests() {
});
test(
'`PersistenceCacheIndexManager` with default persistence settings for each platform',
(widgetTester) async {
() async {
if (defaultTargetPlatform == TargetPlatform.windows) {
try {
// Windows does not have `PersistenceCacheIndexManager` support
Expand Down Expand Up @@ -352,7 +351,7 @@ void runInstanceTests() {

test(
'`PersistenceCacheIndexManager` with persistence enabled for each platform',
(widgetTester) async {
() async {
if (kIsWeb) {
final firestore = FirebaseFirestore.instanceFor(
app: Firebase.app(),
Expand Down Expand Up @@ -400,7 +399,7 @@ void runInstanceTests() {

test(
'`PersistenceCacheIndexManager` with persistence disabled for each platform',
(widgetTester) async {
() async {
if (kIsWeb) {
final firestore = FirebaseFirestore.instanceFor(
app: Firebase.app(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2548,8 +2548,7 @@ void runQueryTests() {
expect(results.docs[1].id, equals('doc3'));
});

test('"whereIn" query combined with "arrayContainsAny"',
(widgetTester) async {
test('"whereIn" query combined with "arrayContainsAny"', () async {
CollectionReference<Map<String, dynamic>> collection =
await initializeTest('where-filter-arraycontainsany-in-combined');
await Future.wait([
Expand Down Expand Up @@ -3844,8 +3843,7 @@ void runQueryTests() {
},
);

test('count(), average() & sum() on empty collection',
(widgetTester) async {
test('count(), average() & sum() on empty collection', () async {
final collection = await initializeTest('empty-collection');

final snapshot = await collection
Expand Down

0 comments on commit 86c4341

Please sign in to comment.