fix lints
This commit is contained in:
+5
-3
@@ -83,19 +83,21 @@ void main() {
|
||||
tester.binding.handleAppLifecycleStateChanged(AppLifecycleState.resumed);
|
||||
await tester.pump();
|
||||
|
||||
expect(repository.refreshCount, 1);
|
||||
expect(repository.refreshCount(), 1);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeSubscriptionRepository extends SubscriptionRepository {
|
||||
int refreshCount = 0;
|
||||
int _refreshCount = 0;
|
||||
|
||||
int refreshCount() => _refreshCount;
|
||||
|
||||
@override
|
||||
Future<SubscriptionStatus> build() async => SubscriptionStatus.inactive;
|
||||
|
||||
@override
|
||||
Future<void> refresh() async {
|
||||
refreshCount++;
|
||||
_refreshCount++;
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -18,8 +18,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
|
||||
|
||||
-1
@@ -12,7 +12,6 @@ import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i5;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// ignore_for_file: avoid_redundant_argument_values, avoid_dynamic_calls
|
||||
// ignore_for_file: avoid_dynamic_calls
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
-1
@@ -12,7 +12,6 @@ import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i5;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: deprecated_member_use
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ void main() {
|
||||
test(
|
||||
'container assignments ensure sing-box profiles are running before syncing',
|
||||
() async {
|
||||
final profileId = SingboxProxyConnectionId('profile-1');
|
||||
const profileId = SingboxProxyConnectionId('profile-1');
|
||||
final assignedContainer = _container(
|
||||
id: 'container-1',
|
||||
contextId: 'context-a',
|
||||
|
||||
-1
@@ -439,7 +439,6 @@ void main() {
|
||||
UrlCleanerRule(
|
||||
name: 'test',
|
||||
data: UrlCleanerRuleData(
|
||||
// ignore: avoid_redundant_argument_values
|
||||
completeProvider: false,
|
||||
urlPattern: r'^https?://example\.com',
|
||||
rules: ['track'],
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ void main() {
|
||||
color: Colors.blue,
|
||||
orderKey: 'a',
|
||||
metadata: ContainerMetadata.withDefaults(
|
||||
proxyConnectionId: SingboxProxyConnectionId('missing-proxy'),
|
||||
proxyConnectionId: const SingboxProxyConnectionId('missing-proxy'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
+1
-1
@@ -438,7 +438,7 @@ class _FakeContainerRepository extends ContainerRepository {
|
||||
|
||||
class _FakeProxyRoutingSettingsRepository
|
||||
extends ProxyRoutingSettingsRepository {
|
||||
ProxyRoutingSettings? _settings;
|
||||
final ProxyRoutingSettings? _settings;
|
||||
|
||||
_FakeProxyRoutingSettingsRepository([this._settings]);
|
||||
|
||||
|
||||
@@ -127,16 +127,18 @@ void main() {
|
||||
test('buildGroupedParentTree creates correct hierarchy', () {
|
||||
final registry = _makeRegistry();
|
||||
final tree = registry.buildGroupedParentTree();
|
||||
final defaultGroup = tree[UBlockAssetGroup.$default];
|
||||
final adsGroup = tree[UBlockAssetGroup.ads];
|
||||
|
||||
expect(tree, contains(UBlockAssetGroup.$default));
|
||||
expect(tree[UBlockAssetGroup.$default]!, contains('uBlock filters'));
|
||||
expect(defaultGroup, contains('uBlock filters'));
|
||||
expect(
|
||||
tree[UBlockAssetGroup.$default]!['uBlock filters'],
|
||||
defaultGroup?['uBlock filters'],
|
||||
containsAll(['ublock-filters', 'ublock-privacy']),
|
||||
);
|
||||
expect(tree, contains(UBlockAssetGroup.ads));
|
||||
expect(tree[UBlockAssetGroup.ads]!, contains(null));
|
||||
expect(tree[UBlockAssetGroup.ads]![null], contains('easylist'));
|
||||
expect(adsGroup, contains(null));
|
||||
expect(adsGroup?[null], contains('easylist'));
|
||||
expect(tree, contains(UBlockAssetGroup.regions));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user