mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
lint fixes
This commit is contained in:
parent
c6fd705748
commit
8a53bda51c
@ -3,7 +3,7 @@ import Basic from './basic.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
config.stubs['nuxt'] = '<span><slot /></span>'
|
||||
config.stubs.nuxt = '<span><slot /></span>'
|
||||
|
||||
describe('basic.vue', () => {
|
||||
let wrapper
|
||||
|
||||
@ -3,7 +3,7 @@ import Blank from './blank.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
config.stubs['nuxt'] = '<span><slot /></span>'
|
||||
config.stubs.nuxt = '<span><slot /></span>'
|
||||
|
||||
describe('blank.vue', () => {
|
||||
let wrapper
|
||||
|
||||
@ -4,7 +4,7 @@ import Default from './default.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
config.stubs['nuxt'] = '<span><slot /></span>'
|
||||
config.stubs.nuxt = '<span><slot /></span>'
|
||||
config.stubs['client-only'] = '<span><slot /></span>'
|
||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||
|
||||
@ -17,7 +17,7 @@ describe('default.vue', () => {
|
||||
mocks = {
|
||||
$t: jest.fn(),
|
||||
$env: {
|
||||
INVITE_REGISTRATION: true
|
||||
INVITE_REGISTRATION: true,
|
||||
},
|
||||
}
|
||||
store = new Vuex.Store({
|
||||
|
||||
@ -12,7 +12,7 @@ describe('invite.vue', () => {
|
||||
$t: jest.fn(),
|
||||
$apollo: {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ describe('notifications.vue', () => {
|
||||
$t: jest.fn(),
|
||||
$apollo: {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ describe('organizations.vue', () => {
|
||||
$t: jest.fn(),
|
||||
$apollo: {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ describe('pages.vue', () => {
|
||||
$t: jest.fn(),
|
||||
$apollo: {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ describe('settings.vue', () => {
|
||||
$t: jest.fn(),
|
||||
$apollo: {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ describe('Login.vue', () => {
|
||||
let tosVersion
|
||||
let redirect
|
||||
|
||||
|
||||
beforeEach(() => {
|
||||
mutations = {
|
||||
// 'posts/SELECT_ORDER': jest.fn(),
|
||||
@ -46,11 +45,11 @@ describe('Login.vue', () => {
|
||||
const data = login.data ? login.data() : {}
|
||||
const aData = await login.asyncData({
|
||||
store,
|
||||
redirect
|
||||
redirect,
|
||||
})
|
||||
login.data = function() {
|
||||
return { ...data, ...aData};
|
||||
};
|
||||
login.data = function () {
|
||||
return { ...data, ...aData }
|
||||
}
|
||||
}
|
||||
return mount(login, {
|
||||
store,
|
||||
@ -76,7 +75,5 @@ describe('Login.vue', () => {
|
||||
wrapper = await Wrapper()
|
||||
expect(redirect).toBeCalledWith('/')
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
@ -15,7 +15,6 @@ describe('password-reset.vue', () => {
|
||||
let redirect
|
||||
let isLoggedIn
|
||||
|
||||
|
||||
beforeEach(() => {
|
||||
mocks = {
|
||||
$t: (t) => t,
|
||||
@ -39,11 +38,11 @@ describe('password-reset.vue', () => {
|
||||
const data = PasswordReset.data ? PasswordReset.data() : {}
|
||||
const aData = await PasswordReset.asyncData({
|
||||
store,
|
||||
redirect
|
||||
redirect,
|
||||
})
|
||||
PasswordReset.data = function() {
|
||||
return { ...data, ...aData};
|
||||
};
|
||||
PasswordReset.data = function () {
|
||||
return { ...data, ...aData }
|
||||
}
|
||||
}
|
||||
return mount(PasswordReset, {
|
||||
mocks,
|
||||
|
||||
@ -29,10 +29,8 @@ describe('post/_id.vue', () => {
|
||||
defaultClient: {
|
||||
query: jest.fn().mockResolvedValue({
|
||||
data: {
|
||||
Post: [
|
||||
{ author: { id: authorId } }
|
||||
]
|
||||
}
|
||||
Post: [{ author: { id: authorId } }],
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
@ -52,9 +50,9 @@ describe('post/_id.vue', () => {
|
||||
error,
|
||||
params: { id: '123' },
|
||||
})
|
||||
_id.data = function() {
|
||||
return { ...data, ...aData};
|
||||
};
|
||||
_id.data = function () {
|
||||
return { ...data, ...aData }
|
||||
}
|
||||
}
|
||||
return mount(_id, { store, mocks, localVue })
|
||||
}
|
||||
@ -70,7 +68,7 @@ describe('post/_id.vue', () => {
|
||||
authorId = 'some-author'
|
||||
userId = 'some-user'
|
||||
wrapper = await Wrapper()
|
||||
expect(error).toBeCalledWith({"message": "error-pages.cannot-edit-post", "statusCode": 403})
|
||||
expect(error).toBeCalledWith({ message: 'error-pages.cannot-edit-post', statusCode: 403 })
|
||||
})
|
||||
|
||||
it('renders with asyncData of same user', async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user