diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-14 10:38:48 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-14 10:38:48 +0300 |
commit | 9daeccfb3ae70bd394be21ac2c1ed87b44cef7fe (patch) | |
tree | 2f7a69da544ce60243224c8f70e3b17e8e9927a3 /spec/javascripts/vue_shared/components | |
parent | 54c2d7bdbddc18953571ed928948c18471d6edfa (diff) | |
parent | 114f93cccff08771dab7c7d11cc24d73960f0fc5 (diff) |
Merge branch '38869-datetime' into 'master'
Export date utility functions as ES6 modules
See merge request gitlab-org/gitlab-ce!15782
Diffstat (limited to 'spec/javascripts/vue_shared/components')
-rw-r--r-- | spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js b/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js index b4c1f70ed1e..b4fb568f1d4 100644 --- a/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js +++ b/spec/javascripts/vue_shared/components/time_ago_tooltip_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import timeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; -import '~/lib/utils/datetime_utility'; +import { formatDate, getTimeago } from '~/lib/utils/datetime_utility'; describe('Time ago with tooltip component', () => { let TimeagoTooltip; @@ -24,10 +24,10 @@ describe('Time ago with tooltip component', () => { expect(vm.$el.tagName).toEqual('TIME'); expect( vm.$el.getAttribute('data-original-title'), - ).toEqual(gl.utils.formatDate('2017-05-08T14:57:39.781Z')); + ).toEqual(formatDate('2017-05-08T14:57:39.781Z')); expect(vm.$el.getAttribute('data-placement')).toEqual('top'); - const timeago = gl.utils.getTimeago(); + const timeago = getTimeago(); expect(vm.$el.textContent.trim()).toEqual(timeago.format('2017-05-08T14:57:39.781Z')); }); |