Skip to content

Commit d10f57b

Browse files
authored
test: add custom check options for strict internet access validation (#117)
1 parent f0a4056 commit d10f57b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/internet_connection_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ void main() {
122122
test('returns true when all URIs are reachable', () async {
123123
final checker = InternetConnection.createInstance(
124124
enableStrictCheck: true,
125+
customCheckOptions: [
126+
InternetCheckOption(uri: Uri.parse('https://one.one.one.one')),
127+
InternetCheckOption(uri: Uri.parse('https://icanhazip.com/')),
128+
InternetCheckOption(
129+
uri: Uri.parse('https://pokeapi.co/api/v2/ability/?limit=1'),
130+
),
131+
],
132+
useDefaultOptions: false,
125133
);
126134
expect(await checker.hasInternetAccess, true);
127135
});

0 commit comments

Comments
 (0)