-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify test suite & move CORS tests
- Loading branch information
Showing
5 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:dio/dio.dart'; | ||
import 'package:dio_test/tests.dart'; | ||
|
||
typedef TestSuiteFunction = void Function( | ||
Dio Function() create, | ||
); | ||
|
||
const _tests = [ | ||
corsTests, | ||
headerTests, | ||
httpMethodTests, | ||
parameterTests, | ||
redirectTests, | ||
statusCodeTests, | ||
timeoutTests, | ||
]; | ||
|
||
void dioAdapterTestSuite( | ||
Dio Function() create, { | ||
List<TestSuiteFunction> tests = _tests, | ||
}) => | ||
tests.forEach((test) => test(create)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export 'src/test/cors_tests.dart'; | ||
export 'src/test/headers_tests.dart'; | ||
export 'src/test/http_method_tests.dart'; | ||
export 'src/test/parameter_tests.dart'; | ||
export 'src/test/redirect_tests.dart'; | ||
export 'src/test/status_code_tests.dart'; | ||
export 'src/test/suite.dart'; | ||
export 'src/test/timeout_tests.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters