@@ -60,7 +60,7 @@ void main() {
6060 final pubspec = File ('test_resources/pubspec_assets_no_list.yaml' );
6161 final config = loadPubspecConfig (pubspec);
6262 final formatter = DartFormatter (
63- languageVersion: currentDartVersion ,
63+ languageVersion: dartFormatterLanguageVersion ,
6464 pageWidth: config.pubspec.flutterGen.lineLength,
6565 lineEnding: '\n ' ,
6666 );
@@ -103,9 +103,12 @@ void main() {
103103 });
104104
105105 test ('Assets with directory path and package parameter enabled' , () async {
106- const pubspec = 'test_resources/pubspec_assets_directory_path_with_package_parameter.yaml' ;
107- const fact = 'test_resources/actual_data/assets_directory_path_with_package_parameter.gen.dart' ;
108- const generated = 'test_resources/lib/gen/assets_directory_path_with_package_parameter.gen.dart' ;
106+ const pubspec =
107+ 'test_resources/pubspec_assets_directory_path_with_package_parameter.yaml' ;
108+ const fact =
109+ 'test_resources/actual_data/assets_directory_path_with_package_parameter.gen.dart' ;
110+ const generated =
111+ 'test_resources/lib/gen/assets_directory_path_with_package_parameter.gen.dart' ;
109112 await expectedAssetsGen (pubspec, generated, fact);
110113 });
111114
@@ -271,8 +274,9 @@ void main() {
271274 buildFile.writeAsStringSync (
272275 File ('test_resources/build_assets.yaml' ).readAsStringSync (),
273276 );
274- await expectedAssetsGen (pubspec, generated, fact);
275- buildFile.writeAsStringSync (originalBuildContent);
277+ await expectedAssetsGen (pubspec, generated, fact).whenComplete (() {
278+ buildFile.writeAsStringSync (originalBuildContent);
279+ });
276280 });
277281 });
278282
0 commit comments