fix: keep client test helpers compatible with es2020

This commit is contained in:
Arthur Belleville 2026-04-19 18:50:27 +02:00
parent dd71653ad5
commit 901c54169c
No known key found for this signature in database

View file

@ -31,7 +31,7 @@ export const renderWithProviders = (
options: RenderWithProvidersOptions = {}
): RenderResult & { user: ReturnType<typeof userEvent.setup> } => {
const { route = "/", path, language = "fr" } = options;
const testUser = Object.hasOwn(options, "testUser") ? options.testUser : defaultUser;
const testUser = Object.prototype.hasOwnProperty.call(options, "testUser") ? options.testUser : defaultUser;
testI18n.changeLanguage(language);