Skip to content

Commit 35cce16

Browse files
authored
Refactor: Migrated src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx from Jest to Vitest (#2909)
1 parent 9105989 commit 35cce16

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.test.tsx renamed to src/components/ChangeLanguageDropdown/ChangeLanguageDropdown.spec.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { MockedProvider } from '@apollo/react-testing';
1111
import { UPDATE_USER_MUTATION } from 'GraphQl/Mutations/mutations';
1212
import { StaticMockLink } from 'utils/StaticMockLink';
1313
import useLocalStorage from 'utils/useLocalstorage';
14+
import { describe, expect, it } from 'vitest';
1415
// import { Provider } from 'react-redux';
1516
// import { store } from 'state/store';
1617
const { setItem } = useLocalStorage();
@@ -52,7 +53,7 @@ const MOCKS = [
5253

5354
const link = new StaticMockLink(MOCKS, true);
5455
describe('Testing Change Language Dropdown', () => {
55-
test('Component Should be rendered properly', async () => {
56+
it('Component Should be rendered properly', async () => {
5657
const { getByTestId } = render(
5758
<MockedProvider addTypename={false} link={link}>
5859
<BrowserRouter>
@@ -81,7 +82,7 @@ describe('Testing Change Language Dropdown', () => {
8182
});
8283
});
8384

84-
test('Component Should accept props properly', async () => {
85+
it('Component Should accept props properly', async () => {
8586
const props = {
8687
parentContainerStyle: 'parentContainerStyle',
8788
btnStyle: 'btnStyle',
@@ -103,7 +104,7 @@ describe('Testing Change Language Dropdown', () => {
103104
getByTestId('dropdown-btn-0').className.includes(props.btnTextStyle);
104105
});
105106

106-
test('Testing when language cookie is not set', async () => {
107+
it('Testing when language cookie is not set', async () => {
107108
Object.defineProperty(window.document, 'cookie', {
108109
writable: true,
109110
value: 'i18next=',
@@ -121,7 +122,7 @@ describe('Testing Change Language Dropdown', () => {
121122
expect(cookies.get('i18next')).toBe('');
122123
});
123124

124-
test('Testing change language functionality', async () => {
125+
it('Testing change language functionality', async () => {
125126
Object.defineProperty(window.document, 'cookie', {
126127
writable: true,
127128
value: 'i18next=sp',

0 commit comments

Comments
 (0)