From f16151121f50b505f26f0af359aae7ea7aa47b04 Mon Sep 17 00:00:00 2001 From: Jordan Nelson Date: Wed, 10 Apr 2024 16:23:26 -0400 Subject: [PATCH] chore: fix test with hard coded dart version --- packages/aft/test/model_test.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/aft/test/model_test.dart b/packages/aft/test/model_test.dart index 53550a56f6..a9552eea02 100644 --- a/packages/aft/test/model_test.dart +++ b/packages/aft/test/model_test.dart @@ -120,11 +120,13 @@ void main() { final currentDartVersion = Version.parse( Platform.version.split(RegExp(r'\s+')).first, ); + final major = currentDartVersion.major; + final minor = currentDartVersion.minor; final stablePackage = await d.package('stable_pkg').create(); final previewPackage = await d .package( 'preview_pkg', - sdkConstraint: '^3.3.0-0', + sdkConstraint: '^$major.${minor + 1}.0-0', ) .create(); expect( @@ -133,7 +135,7 @@ void main() { ); expect( previewPackage.compatibleWithActiveSdk, - currentDartVersion.isPreRelease, + isFalse, ); }); });