-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for skipping tests based on the enforced target platform #25
base: main
Are you sure you want to change the base?
Conversation
49dfe22
to
52b4b43
Compare
/// | ||
/// Setting [failTestOnWrongPlatform] to false will skip the test instead of | ||
/// failing it. | ||
void setFailTestOnWrontPlatform(bool failTestOnWrongPlatform) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void setFailTestOnWrontPlatform(bool failTestOnWrongPlatform) { | |
void setFailTestOnWrongPlatform(bool failTestOnWrongPlatform) { |
TestWidgetsFlutterBinding.ensureInitialized(); | ||
AdaptiveTestConfiguration.instance | ||
..setSkippedTestPlatform(TargetPlatform.macOS) | ||
..setFailTestOnWrontPlatform(false) <-- Adding this will skip the `testAdaptiveWidgets` tests if you are not running the tests on a macOS platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..setFailTestOnWrontPlatform(false) <-- Adding this will skip the `testAdaptiveWidgets` tests if you are not running the tests on a macOS platform. | |
..setFailTestOnWrongPlatform(false) <-- Adding this will skip the `testAdaptiveWidgets` tests if you are not running the tests on a macOS platform. |
Future<void> testExecutable(FutureOr<void> Function() testMain) async { | ||
TestWidgetsFlutterBinding.ensureInitialized(); | ||
AdaptiveTestConfiguration.instance | ||
..setSkippedTestPlatform(TargetPlatform.macOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setSkippedTestPlatform function doesn't seem to exist in this PR.
do you mean ..setEnforcedTestPlatform(TargetPlatform.macOS)
?
Add support for skipping tests instead of failing them based on the enforced target platform defined in the
AdaptiveTestConfiguration
class.