fix(lint): address @sentry/require-fake-timer-cleanup violations#114902
fix(lint): address @sentry/require-fake-timer-cleanup violations#114902natemoo-re wants to merge 5 commits into
@sentry/require-fake-timer-cleanup violations#114902Conversation
32e78c1 to
ae6eedc
Compare
be347b2 to
5fb5e03
Compare
ae6eedc to
531c41c
Compare
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.40% |
| }); | ||
|
|
||
| afterEach(() => { | ||
| act(() => jest.runOnlyPendingTimers()); |
There was a problem hiding this comment.
act?
The first file in the changeset doesn't have act
There was a problem hiding this comment.
Some tests need to wrap this in act() if they render a component that subscribes to a timer, because runOnlyPendingTimers() will trigger a React state update.
| expect( | ||
| await screen.findByText('https://cdn.example.com/runner.min.js.map') | ||
| ).toBeInTheDocument(); |
There was a problem hiding this comment.
we probably can use getByText here.
| await waitFor(() => { | ||
| expect(screen.getByTestId('logs-table')).toBeInTheDocument(); | ||
| }); |
There was a problem hiding this comment.
we can use await findByTestId
| expect(screen.getByTestId('logs-table')).toBeInTheDocument(); | ||
| }); | ||
|
|
||
| const allTreeRows = await screen.findAllByTestId('log-table-row'); |
There was a problem hiding this comment.
and here probably screen.getAllByTestId
| await waitFor(() => { | ||
| expect(within(projectSummary[0]!).getByText('Errors: 3')).toBeInTheDocument(); | ||
| }); |
There was a problem hiding this comment.
shouldn't we use findBy here?
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
This addresses 13 violations from enabling
@sentry/require-fake-timer-cleanup.Stacked PR on top of #114758