Skip to content

Commit 1ceb290

Browse files
committed
test: Add optional Account and InitialSnapshot to store() factory
1 parent 15f57e1 commit 1ceb290

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/example_data.dart

+5-4
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)