File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import 'dart:io';
3
3
import 'package:dart_style/dart_style.dart' ;
4
4
import 'package:dartx/dartx.dart' ;
5
5
import 'package:flutter_gen_core/generators/assets_generator.dart' ;
6
+ import 'package:flutter_gen_core/generators/generator_helper.dart' ;
6
7
import 'package:flutter_gen_core/settings/asset_type.dart' ;
7
8
import 'package:flutter_gen_core/settings/config.dart' ;
8
9
import 'package:flutter_gen_core/utils/error.dart' ;
@@ -267,4 +268,37 @@ void main() {
267
268
expectedPackageNameGen (pubspec, fact);
268
269
});
269
270
});
271
+
272
+ group ('gen helper' , () {
273
+ test ('build deprecations' , () {
274
+ expect (
275
+ sBuildDeprecation (
276
+ 'style' ,
277
+ 'asset' ,
278
+ 'asset.output' ,
279
+ 'https://github.com/FlutterGen/flutter_gen/pull/294' ,
280
+ [
281
+ ' assets:' ,
282
+ ' outputs:' ,
283
+ ' style: snake-case' ,
284
+ ],
285
+ ),
286
+ equals ('''
287
+ ┌─────────────────────────────────────────────────────────────────┐
288
+ | ⚠️ Warning |
289
+ | The style option has been moved from `asset` to `asset.output`. |
290
+ | It should be changed in the `pubspec.yaml`. |
291
+ | https://github.com/FlutterGen/flutter_gen/pull/294 |
292
+ | |
293
+ | ```yaml |
294
+ | flutter_gen: |
295
+ | assets: |
296
+ | outputs: |
297
+ | style: snake-case |
298
+ | ``` |
299
+ └─────────────────────────────────────────────────────────────────┘
300
+ ''' ),
301
+ );
302
+ });
303
+ });
270
304
}
You can’t perform that action at this time.
0 commit comments