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(
result,
equals(
" bind<ApiClient>().toProvideAsync(() => createApiClient()).withName('mainApi').singleton();"));
" bind<ApiClient>()\n"
" .toProvideAsync(() => createApiClient())\n"
" .withName('mainApi')\n"
" .singleton();"));
});
test('should handle different indentation', () {

View File

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