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