Skip to content

Commit

Permalink
fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jul 22, 2020
1 parent 5b8719e commit 1a0c2ae
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
*/

import React from 'react';
import { shallow, mount } from 'enzyme';
import { mount } from 'enzyme';
import { ServerStatus } from './server_status';
import { FormattedStatus } from '../lib';

const getStatus = (parts: Partial<FormattedStatus>): FormattedStatus => ({
const getStatus = (parts: Partial<FormattedStatus['state']> = {}): FormattedStatus['state'] => ({
id: 'green',
title: 'Green',
uiColor: 'secondary',
state: 'green',
message: '',
...parts,
});
Expand All @@ -43,7 +42,6 @@ describe('ServerStatus', () => {
const status = getStatus({
id: 'red',
title: 'Red',
state: 'red',
});
const component = mount(<ServerStatus serverState={status} name="My Computer" />);
expect(component.find('EuiTitle').text()).toMatchInlineSnapshot(`"Kibana status is Red"`);
Expand Down

0 comments on commit 1a0c2ae

Please sign in to comment.