add codecov badge

This commit is contained in:
Sudhanshu Gautam 2021-01-13 18:49:27 +05:30
parent 94203ebf27
commit db9f3c2c32
3 changed files with 2 additions and 32 deletions

View file

@ -1,4 +1,4 @@
# OpenWrt Firmware Selector Wizard
# OpenWrt Firmware Selector Wizard [![codecov](https://codecov.io/gh/sudhanshu16/openwrt-firmware-selector/branch/master/graph/badge.svg?token=F26634D0PG)](https://codecov.io/gh/sudhanshu16/openwrt-firmware-selector)
A simple OpenWrt firmware selector using autocompletion.

View file

@ -6,6 +6,7 @@ jest.mock('react-i18next', () => ({
useTranslation: () => ({
t: (k: string) => k,
i18n: {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
changeLanguage: (l: string) => {},
language: 'en',
},

View file

@ -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();
});
});