fix(tests): update expected outputs in generator tests to match new formatting

This commit is contained in:
Sergey Penkovsky
2025-07-25 12:44:25 +03:00
parent feb7258302
commit 69e166644a
2 changed files with 14 additions and 11 deletions

View File

@@ -245,7 +245,10 @@ void main() {
expect( expect(
result, result,
equals( equals(
" bind<ApiClient>().toProvideAsync(() => createApiClient()).withName('mainApi').singleton();")); " bind<ApiClient>()\n"
" .toProvideAsync(() => createApiClient())\n"
" .withName('mainApi')\n"
" .singleton();"));
}); });
test('should handle different indentation', () { test('should handle different indentation', () {

View File

@@ -202,9 +202,8 @@ part of 'test_widget.dart';
mixin _\$TestWidget { mixin _\$TestWidget {
void _inject(TestWidget instance) { void _inject(TestWidget instance) {
instance.service = CherryPick.openScope( instance.service =
scopeName: 'userScope', CherryPick.openScope(scopeName: 'userScope').resolve<MyService>();
).resolve<MyService>();
} }
} }
'''; ''';
@@ -407,9 +406,10 @@ mixin _\$TestWidget {
instance.cacheService = CherryPick.openRootScope().tryResolve<CacheService>( instance.cacheService = CherryPick.openRootScope().tryResolve<CacheService>(
named: 'cache', named: 'cache',
); );
instance.dbService = CherryPick.openScope( instance.dbService =
scopeName: 'dbScope', CherryPick.openScope(
).resolveAsync<DatabaseService>(); scopeName: 'dbScope',
).resolveAsync<DatabaseService>();
} }
} }
'''; ''';
@@ -451,10 +451,10 @@ part of 'test_widget.dart';
mixin _\$TestWidget { mixin _\$TestWidget {
void _inject(TestWidget instance) { void _inject(TestWidget instance) {
instance.stringList = CherryPick.openRootScope().resolve<List<String>>(); instance.stringList = CherryPick.openRootScope().resolve<List<String>>();
instance.stringIntMap = CherryPick.openRootScope() instance.stringIntMap =
.resolve<Map<String, int>>(); CherryPick.openRootScope().resolve<Map<String, int>>();
instance.futureStringList = CherryPick.openRootScope() instance.futureStringList =
.resolveAsync<List<String>>(); CherryPick.openRootScope().resolveAsync<List<String>>();
} }
} }
'''; ''';