Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Commit 72386bf

Browse files
committed
chore: Update packages
1 parent c92f335 commit 72386bf

File tree

4 files changed

+205
-202
lines changed

4 files changed

+205
-202
lines changed

__mocks__/RootMock.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NextIntlProvider } from 'next-intl';
1+
import { NextIntlClientProvider } from 'next-intl';
22
import { ReactNode } from 'react';
33
import Cookies from 'js-cookie';
44

@@ -12,8 +12,8 @@ export const RootMock = ({ children }: Props) => {
1212
Cookies.set('NEXT_LOCALE', 'en');
1313

1414
return (
15-
<NextIntlProvider messages={messages} locale="en">
15+
<NextIntlClientProvider messages={messages} locale="en">
1616
{children}
17-
</NextIntlProvider>
17+
</NextIntlClientProvider>
1818
);
1919
};

components/button/Button.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { expect, describe, it } from 'vitest';
33

44
import { Button } from './Button';
55

6+
import { RootMock } from '../../__mocks__/RootMock';
7+
68
describe('Button', () => {
79
it('renders children', () => {
810
const { getByText } = render(<Button id="test">Hello World</Button>);
@@ -19,7 +21,8 @@ describe('Button', () => {
1921
const { getByTestId } = render(
2022
<Button id="test" href="/foo">
2123
Click me
22-
</Button>
24+
</Button>,
25+
{ wrapper: RootMock }
2326
);
2427
const button = getByTestId('button_test');
2528
expect(button.tagName).toBe('A');

0 commit comments

Comments
 (0)