From 2cf1b36d5c62c9f44849be8f5226d0da77a72d8b Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Tue, 3 Oct 2023 16:29:38 +0100 Subject: [PATCH] test: Add optional Account and InitialSnapshot to store() factory --- test/example_data.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/example_data.dart b/test/example_data.dart index 7f8206c735..776605b1da 100644 --- a/test/example_data.dart +++ b/test/example_data.dart @@ -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(), ); }