mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-30 07:51:17 -07:00
Chore: homepage tests (#6278)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { render } from "@testing-library/react";
|
||||
|
||||
import { SettingsContext } from "utils/contexts/settings";
|
||||
|
||||
export function renderWithProviders(ui, { settings = {} } = {}) {
|
||||
const value = {
|
||||
settings,
|
||||
// Most tests don't need to mutate settings; this keeps Container happy.
|
||||
setSettings: () => {},
|
||||
};
|
||||
|
||||
return render(<SettingsContext.Provider value={value}>{ui}</SettingsContext.Provider>);
|
||||
}
|
||||
Reference in New Issue
Block a user