Skip to content

Commit 2cf1b36

Browse files
committed
test: Add optional Account and InitialSnapshot to store() factory
1 parent 664f4a5 commit 2cf1b36

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/example_data.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,12 @@ InitialSnapshot initialSnapshot({
273273
crossRealmBots: crossRealmBots ?? [],
274274
);
275275
}
276+
const _initialSnapshot = initialSnapshot;
276277

277-
PerAccountStore store() {
278+
PerAccountStore store({Account? account, InitialSnapshot? initialSnapshot}) {
278279
return PerAccountStore.fromInitialSnapshot(
279-
account: selfAccount,
280-
connection: FakeApiConnection.fromAccount(selfAccount),
281-
initialSnapshot: initialSnapshot(),
280+
account: account ?? selfAccount,
281+
connection: FakeApiConnection.fromAccount(account ?? selfAccount),
282+
initialSnapshot: initialSnapshot ?? _initialSnapshot(),
282283
);
283284
}

0 commit comments

Comments
 (0)