mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fixed Lint
This commit is contained in:
parent
f9fe4f742f
commit
5380a5d6af
@ -5,8 +5,14 @@ import Vuex from 'vuex'
|
|||||||
import Styleguide from '@human-connection/styleguide'
|
import Styleguide from '@human-connection/styleguide'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
|
|
||||||
const routes = [{ path: '/' }]
|
const routes = [
|
||||||
const router = new VueRouter({ routes })
|
{
|
||||||
|
path: '/',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const router = new VueRouter({
|
||||||
|
routes,
|
||||||
|
})
|
||||||
const localVue = createLocalVue()
|
const localVue = createLocalVue()
|
||||||
|
|
||||||
localVue.use(Vuex)
|
localVue.use(Vuex)
|
||||||
@ -44,7 +50,12 @@ describe('DeleteModal.vue', () => {
|
|||||||
|
|
||||||
describe('shallowMount', () => {
|
describe('shallowMount', () => {
|
||||||
Wrapper = () => {
|
Wrapper = () => {
|
||||||
return shallowMount(DeleteModal, { propsData, mocks, localVue, router })
|
return shallowMount(DeleteModal, {
|
||||||
|
propsData,
|
||||||
|
mocks,
|
||||||
|
localVue,
|
||||||
|
router,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('defaults', () => {
|
describe('defaults', () => {
|
||||||
@ -73,7 +84,14 @@ describe('DeleteModal.vue', () => {
|
|||||||
it('mentions post title', () => {
|
it('mentions post title', () => {
|
||||||
Wrapper()
|
Wrapper()
|
||||||
const calls = mocks.$t.mock.calls
|
const calls = mocks.$t.mock.calls
|
||||||
const expected = [['delete.contribution.message', { name: 'It is a post' }]]
|
const expected = [
|
||||||
|
[
|
||||||
|
'delete.contribution.message',
|
||||||
|
{
|
||||||
|
name: 'It is a post',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
]
|
||||||
expect(calls).toEqual(expect.arrayContaining(expected))
|
expect(calls).toEqual(expect.arrayContaining(expected))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -94,7 +112,14 @@ describe('DeleteModal.vue', () => {
|
|||||||
it('mentions comments user name', () => {
|
it('mentions comments user name', () => {
|
||||||
Wrapper()
|
Wrapper()
|
||||||
const calls = mocks.$t.mock.calls
|
const calls = mocks.$t.mock.calls
|
||||||
const expected = [['delete.comment.message', { name: 'It is the user of the comment' }]]
|
const expected = [
|
||||||
|
[
|
||||||
|
'delete.comment.message',
|
||||||
|
{
|
||||||
|
name: 'It is the user of the comment',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
]
|
||||||
expect(calls).toEqual(expect.arrayContaining(expected))
|
expect(calls).toEqual(expect.arrayContaining(expected))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -102,7 +127,12 @@ describe('DeleteModal.vue', () => {
|
|||||||
|
|
||||||
describe('mount', () => {
|
describe('mount', () => {
|
||||||
Wrapper = () => {
|
Wrapper = () => {
|
||||||
return mount(DeleteModal, { propsData, mocks, localVue, router })
|
return mount(DeleteModal, {
|
||||||
|
propsData,
|
||||||
|
mocks,
|
||||||
|
localVue,
|
||||||
|
router,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(jest.useFakeTimers)
|
beforeEach(jest.useFakeTimers)
|
||||||
|
|||||||
@ -17,9 +17,7 @@
|
|||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<p v-html="message" />
|
<p v-html="message" />
|
||||||
|
|
||||||
<template
|
<template slot="footer">
|
||||||
slot="footer"
|
|
||||||
>
|
|
||||||
<ds-button
|
<ds-button
|
||||||
class="cancel"
|
class="cancel"
|
||||||
icon="close"
|
icon="close"
|
||||||
@ -42,7 +40,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import gql from 'graphql-tag'
|
|
||||||
import { SweetalertIcon } from 'vue-sweetalert-icons'
|
import { SweetalertIcon } from 'vue-sweetalert-icons'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user