mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-01-24 13:13:16 -05:00
fix eslint 8 complaints
I'm working on this upgrade now. https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-presence-queries.md
This commit is contained in:
parent
d40715c210
commit
bc29e8b23c
@ -30,23 +30,23 @@ test("notifications that time out", async () => {
|
||||
);
|
||||
|
||||
// message A should be present immediately.
|
||||
expect(screen.queryByText(/message A/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/message A/)).toBeInTheDocument();
|
||||
expect(screen.queryByText(/message B/)).not.toBeInTheDocument();
|
||||
|
||||
// ...then start to close...
|
||||
jest.advanceTimersByTime(5000);
|
||||
expect(screen.queryByText(/message A/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/message A/)).toBeInTheDocument();
|
||||
expect(screen.queryByText(/message B/)).not.toBeInTheDocument();
|
||||
|
||||
// ...then it should close and message B should open...
|
||||
jest.runOnlyPendingTimers();
|
||||
expect(screen.queryByText(/message A/)).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(/message B/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/message B/)).toBeInTheDocument();
|
||||
|
||||
// ...then message B should start to close...
|
||||
jest.advanceTimersByTime(5000);
|
||||
expect(screen.queryByText(/message A/)).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(/message B/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/message B/)).toBeInTheDocument();
|
||||
|
||||
// ...then message B should fully close.
|
||||
jest.runOnlyPendingTimers();
|
||||
|
Loading…
x
Reference in New Issue
Block a user