lint
This commit is contained in:
parent
87f8f3fcaa
commit
b124d2b8ea
2 changed files with 17 additions and 4 deletions
|
|
@ -192,7 +192,11 @@ export const useStatusesStore = defineStore('statuses', {
|
||||||
credentials: useOAuthStore().token,
|
credentials: useOAuthStore().token,
|
||||||
}).then(({ data, timestamp }) => {
|
}).then(({ data, timestamp }) => {
|
||||||
data.forEach((reaction) => {
|
data.forEach((reaction) => {
|
||||||
const users = useUsersStore().addNewUsers({ timestamp, data: reaction.accounts })
|
const users = useUsersStore().addNewUsers({
|
||||||
|
timestamp,
|
||||||
|
data: reaction.accounts,
|
||||||
|
})
|
||||||
|
reaction.accounts = users
|
||||||
})
|
})
|
||||||
this.addEmojiReactionsBy(id, data)
|
this.addEmojiReactionsBy(id, data)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,10 @@ describe('Statuses store', () => {
|
||||||
'EmojiReactions',
|
'EmojiReactions',
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
accounts: [mockMastoAPIUser({ id: 'u1' }), mockMastoAPIUser({ id: 'u2' })],
|
accounts: [
|
||||||
|
mockMastoAPIUser({ id: 'u1' }),
|
||||||
|
mockMastoAPIUser({ id: 'u2' }),
|
||||||
|
],
|
||||||
count: 1,
|
count: 1,
|
||||||
me: false,
|
me: false,
|
||||||
name: 'cofe',
|
name: 'cofe',
|
||||||
|
|
@ -298,8 +301,14 @@ describe('Statuses store', () => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
['Favs', [mockMastoAPIUser({ id: 'u1' }), mockMastoAPIUser({ id: 'u2' })]],
|
[
|
||||||
['Repeats', [mockMastoAPIUser({ id: 'u1' }), mockMastoAPIUser({ id: 'u2' })]],
|
'Favs',
|
||||||
|
[mockMastoAPIUser({ id: 'u1' }), mockMastoAPIUser({ id: 'u2' })],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'Repeats',
|
||||||
|
[mockMastoAPIUser({ id: 'u1' }), mockMastoAPIUser({ id: 'u2' })],
|
||||||
|
],
|
||||||
])('fetch%s', async (group, mockedResponse) => {
|
])('fetch%s', async (group, mockedResponse) => {
|
||||||
const mockFetch = vi.fn()
|
const mockFetch = vi.fn()
|
||||||
mockFetch.mockResolvedValueOnce(
|
mockFetch.mockResolvedValueOnce(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue