Fixed TS errors in tests

This commit is contained in:
Alejandro Celaya 2021-06-13 11:54:51 +02:00
parent 1cf96c7212
commit 7b80948eea
3 changed files with 5 additions and 0 deletions

View file

@ -9,6 +9,7 @@ import VisitsStats from '../../src/visits/VisitsStats';
import { OrphanVisitsHeader } from '../../src/visits/OrphanVisitsHeader';
import { Settings } from '../../src/settings/reducers/settings';
import { VisitsExporter } from '../../src/visits/services/VisitsExporter';
import { SelectedServer } from '../../src/servers/data';
describe('<OrphanVisits />', () => {
it('wraps visits stats and header', () => {
@ -28,6 +29,7 @@ describe('<OrphanVisits />', () => {
location={Mock.all<Location>()}
match={Mock.of<match>({ url: 'the_base_url' })}
settings={Mock.all<Settings>()}
selectedServer={Mock.all<SelectedServer>()}
/>,
).dive();
const stats = wrapper.find(VisitsStats);

View file

@ -10,6 +10,7 @@ import LineChartCard from '../../src/visits/helpers/LineChartCard';
import VisitsTable from '../../src/visits/VisitsTable';
import { Result } from '../../src/utils/Result';
import { Settings } from '../../src/settings/reducers/settings';
import { SelectedServer } from '../../src/servers/data';
describe('<VisitStats />', () => {
const visits = [ Mock.all<Visit>(), Mock.all<Visit>(), Mock.all<Visit>() ];
@ -27,6 +28,7 @@ describe('<VisitStats />', () => {
baseUrl={''}
settings={Mock.all<Settings>()}
exportCsv={exportCsv}
selectedServer={Mock.all<SelectedServer>()}
/>,
);

View file

@ -39,6 +39,7 @@ describe('VisitsExporter', () => {
longitude: 0,
os: 'os',
referer: 'referer',
potentialBot: false,
},
];