You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal_link test: Push store setup properly inside test code
Generally the application code should be run inside test cases, and
not from the test-discovery code that runs before the test harness
even knows what the list of test cases is. That means it should be
called from inside a `test` callback, not from `main` itself or from
a `group` callback.
There's a lot of application code that runs as part of calls like
`store.addStreams` and `store.addUser`. So this `setupStore` method
should be called from inside the test cases. Do that.
In particular this is needed in order to make an async method out of
PerAccountStore.handleEvent, which underlies those helpers like
`addStreams`. Async calls especially need to be kept out of
test-discovery time, because `package:test` requires all the test
discovery to be completed synchronously.
0 commit comments