Skip to content

Commit

Permalink
test: Add optional Account and InitialSnapshot to store() factory
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpengi committed Oct 12, 2023
1 parent 664f4a5 commit 2cf1b36
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/example_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,12 @@ InitialSnapshot initialSnapshot({
crossRealmBots: crossRealmBots ?? [],
);
}
const _initialSnapshot = initialSnapshot;

PerAccountStore store() {
PerAccountStore store({Account? account, InitialSnapshot? initialSnapshot}) {
return PerAccountStore.fromInitialSnapshot(
account: selfAccount,
connection: FakeApiConnection.fromAccount(selfAccount),
initialSnapshot: initialSnapshot(),
account: account ?? selfAccount,
connection: FakeApiConnection.fromAccount(account ?? selfAccount),
initialSnapshot: initialSnapshot ?? _initialSnapshot(),
);
}

0 comments on commit 2cf1b36

Please sign in to comment.