Files
homepage/src/test-utils/render-with-providers.jsx
T
dependabot[bot] 81accd8dbe
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Chore(deps-dev): Bump eslint-config-next from 15.5.22 to 16.3.3 (#7082)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
2026-09-01 10:52:46 -07:00

14 lines
410 B
React

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>);
}