Skip to content

Commit 27c10cc

Browse files
committed
Add test
1 parent 4a4580b commit 27c10cc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/flutter_gen_test.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,22 @@ void main() {
160160
expect(actual, expected);
161161
});
162162

163+
test('Assets camel-case style on pubspec.yaml', () async {
164+
final pubspec = File('test_resources/pubspec_assets_camel_case.yaml');
165+
final config = await Config(pubspec).load();
166+
final formatter = DartFormatter(
167+
pageWidth: config.flutterGen.lineLength, lineEnding: '\n');
168+
169+
final actual = generateAssets(
170+
pubspec, formatter, config.flutterGen, config.flutter.assets);
171+
final expected =
172+
File('test_resources/actual_data/assets_camel_case.gen.dart')
173+
.readAsStringSync()
174+
.replaceAll('\r\n', '\n');
175+
176+
expect(actual, expected);
177+
});
178+
163179
test('Assets with No inegrations on pubspec.yaml', () async {
164180
await FlutterGenerator(
165181
File('test_resources/pubspec_assets_no_integrations.yaml'))

0 commit comments

Comments
 (0)