Commit b9f0d367 authored by jakeburden's avatar jakeburden

Update timeago usage in environment item test

parent f66cffc8
import 'timeago.js'; import { format } from 'timeago.js';
import Vue from 'vue'; import Vue from 'vue';
import environmentItemComp from '~/environments/components/environment_item.vue'; import environmentItemComp from '~/environments/components/environment_item.vue';
...@@ -139,8 +139,7 @@ describe('Environment item', () => { ...@@ -139,8 +139,7 @@ describe('Environment item', () => {
}); });
it('should render last deployment date', () => { it('should render last deployment date', () => {
const timeagoInstance = new timeago(); // eslint-disable-line const formatedDate = format(environment.last_deployment.deployed_at);
const formatedDate = timeagoInstance.format(environment.last_deployment.deployed_at);
expect( expect(
component.$el.querySelector('.environment-created-date-timeago').textContent, component.$el.querySelector('.environment-created-date-timeago').textContent,
......
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