Language switch button unit test #108

Merged
jakob.scheid merged 23 commits from testing/language-switch into main 2026-06-04 13:46:17 +02:00
Showing only changes of commit 27f696247d - Show all commits
@@ -1,22 +1,22 @@
/* /*
jakob.scheid marked this conversation as resolved Outdated
Outdated
Review

Can you please use the variant without the * indentation? That is more common, cleaner and better for automated tools.

Can you please use the variant without the ` * ` indentation? That is more common, cleaner and better for automated tools.
* Copyright 2026 Seekra Copyright 2026 Seekra
*
* Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
* You may obtain a copy of the License at You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and See the License for the specific language governing permissions and
* limitations under the License. limitations under the License.
*/ */
import { expect, test, describe, vi, beforeEach } from 'vitest'; import { expect, test, describe, vi, beforeEach } from 'vitest';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import LanguageSwitchButton from '@/features/i18n/components/LanguageSwitchButton.vue'; import LanguageSwitchButton from '../LanguageSwitchButton.vue';
import { loadLanguage } from '@/i18n'; import { loadLanguage } from '@/i18n';
vi.mock('@/i18n', () => ({ vi.mock('@/i18n', () => ({
@@ -47,7 +47,7 @@ describe('LanguageSwitchButton.vue', () => {
document.documentElement.dir = ''; document.documentElement.dir = '';
}); });
test('renders correctly with initial state closed', () => { test('renders correctly with initial state closed', () => {
jakob.scheid marked this conversation as resolved Outdated
Outdated
Review

Could you please fix the indentation to make it more readable?

Could you please fix the indentation to make it more readable?
const wrapper = mount(LanguageSwitchButton); const wrapper = mount(LanguageSwitchButton);
expect(wrapper.find('.language-button').exists()).toBe(true); expect(wrapper.find('.language-button').exists()).toBe(true);