Commit 5a520d37 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'psi-geo-replicable-date' into 'master'

Fix date-dependent snapshot test with useFakeDate

See merge request gitlab-org/gitlab!42420
parents f54038fb 0a98a4d5
import Vuex from 'vuex';
import { createLocalVue, mount } from '@vue/test-utils';
import { useFakeDate } from 'helpers/fake_date';
import createStore from 'ee/geo_replicable/store';
import GeoReplicableTimeAgo from 'ee/geo_replicable/components/geo_replicable_time_ago.vue';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
......@@ -34,6 +35,9 @@ describe('GeoReplicableTimeAgo', () => {
const findDefaultText = () => findGeoReplicableTimeAgo().find('span');
describe('template', () => {
// ensure consistent output for timeago
useFakeDate(2020, 0, 1);
beforeEach(() => {
createComponent();
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment