From db2f48a1f91e2e787aaf65207047f6cde3bf3f3d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 11 Feb 2026 20:42:31 +0200 Subject: [PATCH] lint --- test/unit/specs/boot/routes.spec.js | 4 +++- test/unit/specs/components/draft.spec.js | 2 +- test/unit/specs/components/emoji_input.spec.js | 5 +++-- test/unit/specs/modules/statuses.spec.js | 6 ++++-- test/unit/specs/stores/oauth.spec.js | 11 ++++++----- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/test/unit/specs/boot/routes.spec.js b/test/unit/specs/boot/routes.spec.js index 8795ea04e..f4be28a65 100644 --- a/test/unit/specs/boot/routes.spec.js +++ b/test/unit/specs/boot/routes.spec.js @@ -1,5 +1,7 @@ import { createTestingPinia } from '@pinia/testing' - createTestingPinia() + +createTestingPinia() + import { createMemoryHistory, createRouter } from 'vue-router' import { createStore } from 'vuex' diff --git a/test/unit/specs/components/draft.spec.js b/test/unit/specs/components/draft.spec.js index eb35cb58f..7bc053f52 100644 --- a/test/unit/specs/components/draft.spec.js +++ b/test/unit/specs/components/draft.spec.js @@ -1,6 +1,6 @@ +import { createTestingPinia } from '@pinia/testing' import { flushPromises, mount } from '@vue/test-utils' import { nextTick } from 'vue' -import { createTestingPinia } from '@pinia/testing' import PostStatusForm from 'src/components/post_status_form/post_status_form.vue' import { $t, mountOpts, waitForEvent } from '../../../fixtures/setup_test' diff --git a/test/unit/specs/components/emoji_input.spec.js b/test/unit/specs/components/emoji_input.spec.js index 83ffd13d2..032e7e9b6 100644 --- a/test/unit/specs/components/emoji_input.spec.js +++ b/test/unit/specs/components/emoji_input.spec.js @@ -1,8 +1,9 @@ +import { createTestingPinia } from '@pinia/testing' import { shallowMount } from '@vue/test-utils' import vClickOutside from 'click-outside-vue3' import { h } from 'vue' -import { createTestingPinia } from '@pinia/testing' - createTestingPinia() + +createTestingPinia() import EmojiInput from 'src/components/emoji_input/emoji_input.vue' diff --git a/test/unit/specs/modules/statuses.spec.js b/test/unit/specs/modules/statuses.spec.js index 3d1027ad4..1315724da 100644 --- a/test/unit/specs/modules/statuses.spec.js +++ b/test/unit/specs/modules/statuses.spec.js @@ -1,10 +1,12 @@ +import { createTestingPinia } from '@pinia/testing' + import { defaultState, mutations, prepareStatus, } from '../../../../src/modules/statuses.js' -import { createTestingPinia } from '@pinia/testing' - createTestingPinia() + +createTestingPinia() const makeMockStatus = ({ id, text, type = 'status' }) => { return { diff --git a/test/unit/specs/stores/oauth.spec.js b/test/unit/specs/stores/oauth.spec.js index 977b15432..4664bba02 100644 --- a/test/unit/specs/stores/oauth.spec.js +++ b/test/unit/specs/stores/oauth.spec.js @@ -1,6 +1,6 @@ -import { HttpResponse, http } from 'msw' -import { setActivePinia, createPinia } from 'pinia' import { createTestingPinia } from '@pinia/testing' +import { HttpResponse, http } from 'msw' +import { createPinia, setActivePinia } from 'pinia' import { authApis, @@ -8,8 +8,8 @@ import { testServer, } from '/test/fixtures/mock_api.js' -import { useOAuthStore } from 'src/stores/oauth.js' import { useInstanceStore } from 'src/stores/instance.js' +import { useOAuthStore } from 'src/stores/oauth.js' const test = injectMswToTest(authApis) @@ -61,7 +61,6 @@ describe('oauth store', () => { }), ) - const store = useOAuthStore() store.clientId = 'another-id' store.clientSecret = 'another-secret' @@ -183,7 +182,9 @@ describe('oauth store', () => { await expect(store.ensureAppToken()).rejects.toThrowError('Throttled') }) - test('it should throw if we cannot obtain app token', async ({ worker }) => { + test('it should throw if we cannot obtain app token', async ({ + worker, + }) => { worker.use( http.post(`${testServer}/oauth/token`, () => { return HttpResponse.text('Throttled', { status: 429 })