mirror of
https://git.netzspielplatz.de/docker-multiarch/openwrt-firmware-selector.git
synced 2025-11-08 20:39:25 +00:00
add codecov badge
This commit is contained in:
parent
94203ebf27
commit
db9f3c2c32
3 changed files with 2 additions and 32 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# OpenWrt Firmware Selector Wizard
|
# OpenWrt Firmware Selector Wizard [](https://codecov.io/gh/sudhanshu16/openwrt-firmware-selector)
|
||||||
|
|
||||||
A simple OpenWrt firmware selector using autocompletion.
|
A simple OpenWrt firmware selector using autocompletion.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ jest.mock('react-i18next', () => ({
|
||||||
useTranslation: () => ({
|
useTranslation: () => ({
|
||||||
t: (k: string) => k,
|
t: (k: string) => k,
|
||||||
i18n: {
|
i18n: {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
changeLanguage: (l: string) => {},
|
changeLanguage: (l: string) => {},
|
||||||
language: 'en',
|
language: 'en',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
/* 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, waitFor } from '@testing-library/react';
|
|
||||||
|
|
||||||
import Home from './home';
|
|
||||||
import VersionSelector from './components/VersionSelector';
|
|
||||||
|
|
||||||
jest.mock('react-i18next', () => ({
|
|
||||||
useTranslation: () => ({
|
|
||||||
t: (k: string) => k,
|
|
||||||
i18n: {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
changeLanguage: (l: string) => {},
|
|
||||||
language: 'en',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('Home', () => {
|
|
||||||
it('renders the component and sends a get request', async () => {
|
|
||||||
const { getByTestId, findByRole } = render(<Home />);
|
|
||||||
|
|
||||||
const versionSelect = getByTestId('version-select');
|
|
||||||
fireEvent.change(versionSelect, { value: '1234' });
|
|
||||||
|
|
||||||
expect(versionSelect).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue