diff --git a/webapp/components/RelativeDateTime/index.spec.js b/webapp/components/RelativeDateTime/index.spec.js
index 7952f14ec..89c0e40fb 100644
--- a/webapp/components/RelativeDateTime/index.spec.js
+++ b/webapp/components/RelativeDateTime/index.spec.js
@@ -1,15 +1,24 @@
-import { shallowMount } from '@vue/test-utils'
+import { shallowMount, createLocalVue } from '@vue/test-utils'
import RelativeDateTime from './index.vue'
+import Filters from '../../plugins/vue-filters.js'
+const localVue = createLocalVue()
+localVue.use(Filters)
+
describe('RelativeDateTime', () => {
let wrapper
beforeEach(() => {
- wrapper = shallowMount(RelativeDateTime, {})
+ wrapper = shallowMount(RelativeDateTime, {
+ localVue,
+ propsData: {
+ dateTime: new Date()
+ }
+ })
})
it('renders', () => {
console.log(wrapper.html())
- expect(wrapper.is('div')).toBe(true)
+ expect(wrapper.is('span')).toBe(true)
})
})
diff --git a/webapp/components/RelativeDateTime/index.vue b/webapp/components/RelativeDateTime/index.vue
index 2c7d82dfe..b3d20a909 100644
--- a/webapp/components/RelativeDateTime/index.vue
+++ b/webapp/components/RelativeDateTime/index.vue
@@ -1,5 +1,5 @@
- {{ relativeDateTime }}
+ {{ relativeDateTime }}