Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { shallowWithIntl, renderWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import moment from 'moment';
import { BrowserRouter as Router } from 'react-router-dom';
import { MostRecentError } from '../most_recent_error';
import { MonitorDetails, MonitorError } from '../../../../../../common/runtime_types';
Expand All @@ -14,6 +15,10 @@ describe('MostRecentError component', () => {
let monitorDetails: MonitorDetails;
let monitorError: MonitorError;

beforeAll(() => {
moment.prototype.fromNow = jest.fn(() => '5 days ago');
});

beforeEach(() => {
monitorError = {
type: 'io',
Expand All @@ -39,7 +44,7 @@ describe('MostRecentError component', () => {
expect(component).toMatchSnapshot();
});

it.skip('renders properly with empty data', () => {
it('renders properly with mock data', () => {
const component = renderWithIntl(
<Router>
<MostRecentError
Expand Down