Skip to content

Commit 4e48d0a

Browse files
committed
test: refactor render with app context
Signed-off-by: Adam Setch <[email protected]>
1 parent 04cfba4 commit 4e48d0a

File tree

2 files changed

+10
-50
lines changed

2 files changed

+10
-50
lines changed

src/renderer/components/AllRead.test.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ describe('renderer/components/AllRead.tsx', () => {
1313
});
1414

1515
it('should render itself & its children - no filters', async () => {
16-
const tree = renderWithAppContext(<AllRead />, {
17-
settings: {
18-
...mockSettings,
19-
},
16+
let tree: ReturnType<typeof renderWithAppContext> | null = null;
17+
18+
await act(async () => {
19+
tree = renderWithAppContext(<AllRead />, {
20+
settings: {
21+
...mockSettings,
22+
},
23+
});
2024
});
2125

2226
expect(tree).toMatchSnapshot();

src/renderer/components/filters/__snapshots__/SearchFilterSuggestions.test.tsx.snap

Lines changed: 2 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)