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
Is your feature request related to a problem? Please describe.
Today, we have several mocks that we call in our unit tests. We set these up in beforeAll blocks like:
A lot of this code is redundant, and ideally we'd reference these parameterless mock functions only once. It is rare that we'd want to use any of the functions they override, because they frequently cause false test failures in CI; usually these failures are related to inconsistent date/time assertions.
Describe the solution you'd like
In a recent review, there was a comment pointing out we can probably run these in a global context for jest, such that there's no need to reference them in individual test files. This could allow us to delete redundant beforeAll blocks, and would make our tests more efficient.
Describe alternatives you've considered
N/A
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Today, we have several mocks that we call in our unit tests. We set these up in
beforeAll
blocks like:A lot of this code is redundant, and ideally we'd reference these parameterless mock functions only once. It is rare that we'd want to use any of the functions they override, because they frequently cause false test failures in CI; usually these failures are related to inconsistent date/time assertions.
Describe the solution you'd like
In a recent review, there was a comment pointing out we can probably run these in a global context for
jest
, such that there's no need to reference them in individual test files. This could allow us to delete redundantbeforeAll
blocks, and would make our tests more efficient.Describe alternatives you've considered
N/A
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: