We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05c390b commit e446c42Copy full SHA for e446c42
src/renderer/__helpers__/test-utils.tsx
@@ -57,11 +57,9 @@ export function renderWithAppContext(
57
ui: ReactElement,
58
context: Partial<AppContextState> = {},
59
) {
60
- const value: Partial<AppContextState> = { ...context };
61
-
62
return render(ui, {
63
wrapper: ({ children }) => (
64
- <AppContextProvider value={value}>{children}</AppContextProvider>
+ <AppContextProvider value={context}>{children}</AppContextProvider>
65
),
66
});
67
}
@@ -70,5 +68,5 @@ export function renderWithAppContext(
70
68
* Ensure stable snapshots for our randomized emoji use-cases
71
69
*/
72
export function ensureStableEmojis() {
73
- global.Math.random = jest.fn(() => 0.1);
+ globalThis.Math.random = jest.fn(() => 0.1);
74
0 commit comments