mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-15 03:53:51 +00:00
Created ImageDownloader test
This commit is contained in:
@@ -3,7 +3,7 @@ import { Doughnut } from 'react-chartjs-2';
|
||||
import { keys, values } from 'ramda';
|
||||
import { DoughnutChart } from '../../../src/visits/charts/DoughnutChart';
|
||||
|
||||
describe.skip('<DoughnutChart />', () => {
|
||||
describe('<DoughnutChart />', () => {
|
||||
let wrapper: ShallowWrapper;
|
||||
const stats = {
|
||||
foo: 123,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { prettify } from '../../../src/utils/helpers/numbers';
|
||||
import { MAIN_COLOR, MAIN_COLOR_ALPHA } from '../../../src/utils/theme';
|
||||
import { HorizontalBarChart } from '../../../src/visits/charts/HorizontalBarChart';
|
||||
|
||||
describe.skip('<HorizontalBarChart />', () => {
|
||||
describe('<HorizontalBarChart />', () => {
|
||||
let wrapper: ShallowWrapper;
|
||||
const stats = {
|
||||
foo: 123,
|
||||
@@ -16,7 +16,6 @@ describe.skip('<HorizontalBarChart />', () => {
|
||||
it('renders Bar with expected properties', () => {
|
||||
wrapper = shallow(<HorizontalBarChart stats={stats} />);
|
||||
const horizontal = wrapper.find(Bar);
|
||||
const cols = wrapper.find('.col-sm-12');
|
||||
|
||||
expect(horizontal).toHaveLength(1);
|
||||
|
||||
@@ -37,7 +36,6 @@ describe.skip('<HorizontalBarChart />', () => {
|
||||
},
|
||||
y: { stacked: true },
|
||||
});
|
||||
expect(cols).toHaveLength(1);
|
||||
});
|
||||
|
||||
it.each([
|
||||
|
||||
@@ -2,19 +2,9 @@ import { Mock } from 'ts-mockery';
|
||||
import { CsvJson } from 'csvjson';
|
||||
import { VisitsExporter } from '../../../src/visits/services/VisitsExporter';
|
||||
import { NormalizedVisit } from '../../../src/visits/types';
|
||||
import { windowMock } from '../../mocks/WindowMock';
|
||||
|
||||
describe('VisitsExporter', () => {
|
||||
const createLinkMock = () => ({
|
||||
setAttribute: jest.fn(),
|
||||
click: jest.fn(),
|
||||
style: {},
|
||||
});
|
||||
const windowMock = Mock.of<Window>({
|
||||
document: {
|
||||
createElement: jest.fn(createLinkMock),
|
||||
body: { appendChild: jest.fn(), removeChild: jest.fn() },
|
||||
},
|
||||
});
|
||||
const toCSV = jest.fn();
|
||||
const csvToJsonMock = Mock.of<CsvJson>({ toCSV });
|
||||
let exporter: VisitsExporter;
|
||||
|
||||
Reference in New Issue
Block a user