diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index a80f994..85abd2b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -38,4 +38,7 @@ jobs:
run: yarn lint
- name: Test 🔧
- run: yarn test
+ run: yarn test -- --coverage
+
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v1
diff --git a/src/components/Header.test.tsx b/src/components/Header.test.tsx
new file mode 100644
index 0000000..c50e4ad
--- /dev/null
+++ b/src/components/Header.test.tsx
@@ -0,0 +1,60 @@
+/* eslint-disable react/jsx-props-no-spreading */
+/* eslint-disable @typescript-eslint/no-non-null-assertion */
+/* eslint-disable no-await-in-loop */
+/* eslint-disable no-restricted-syntax */
+import React from 'react';
+import { fireEvent, render, RenderResult, waitFor } from '@testing-library/react';
+
+import Header from './Header';
+
+const mockChangeLanguage = jest.fn();
+
+jest.mock('react-i18next', () => ({
+ useTranslation: () => ({
+ t: (k: string) => k,
+ i18n: {
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ changeLanguage: mockChangeLanguage,
+ language: undefined,
+ },
+ }),
+}));
+
+describe('Header', () => {
+ it('opens the language menu list when the button is clicked', async () => {
+ const { getByTestId } = render(