better imports organization

This commit is contained in:
Henry Jameson 2026-01-08 17:26:52 +02:00
commit 42930252b1
167 changed files with 663 additions and 445 deletions

View file

@ -1,7 +1,8 @@
import { cloneDeep } from 'lodash'
import vuexModules from 'src/modules/index.js'
import { createStore } from 'vuex'
import vuexModules from 'src/modules/index.js'
const tweakModules = (modules) => {
const res = {}
Object.entries(modules).forEach(([name, module]) => {

View file

@ -1,7 +1,8 @@
import { config } from '@vue/test-utils'
import routes from 'src/boot/routes'
import { createMemoryHistory, createRouter } from 'vue-router'
import VueVirtualScroller from 'vue-virtual-scroller'
import routes from 'src/boot/routes'
import makeMockStore from './mock_store'
export const $t = (msg) => msg

View file

@ -1,7 +1,8 @@
import routes from 'src/boot/routes'
import { createMemoryHistory, createRouter } from 'vue-router'
import { createStore } from 'vuex'
import routes from 'src/boot/routes'
const store = createStore({
state: {
instance: {},

View file

@ -1,6 +1,7 @@
import { flushPromises, mount } from '@vue/test-utils'
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
import { nextTick } from 'vue'
import PostStatusForm from 'src/components/post_status_form/post_status_form.vue'
import { $t, mountOpts, waitForEvent } from '../../../fixtures/setup_test'
const autoSaveOrNot = (caseFn, caseTitle, runFn) => {

View file

@ -1,8 +1,9 @@
import { shallowMount } from '@vue/test-utils'
import vClickOutside from 'click-outside-vue3'
import EmojiInput from 'src/components/emoji_input/emoji_input.vue'
import { h } from 'vue'
import EmojiInput from 'src/components/emoji_input/emoji_input.vue'
const generateInput = (value, padEmoji = true) => {
const wrapper = shallowMount(EmojiInput, {
global: {

View file

@ -1,4 +1,5 @@
import { mount, shallowMount } from '@vue/test-utils'
import RichContent from 'src/components/rich_content/rich_content.jsx'
const attentions = []

View file

@ -1,8 +1,9 @@
import { mount } from '@vue/test-utils'
import { createStore } from 'vuex'
import UserProfile from 'src/components/user_profile/user_profile.vue'
import { getters } from 'src/modules/users.js'
import backendInteractorService from 'src/services/backend_interactor_service/backend_interactor_service.js'
import { createStore } from 'vuex'
const mutations = {
clearTimeline: () => {

View file

@ -1,8 +1,9 @@
import { flushPromises } from '@vue/test-utils'
import { createPinia, defineStore, setActivePinia } from 'pinia'
import { piniaPersistPlugin } from 'src/lib/persisted_state.js'
import { createApp } from 'vue'
import { piniaPersistPlugin } from 'src/lib/persisted_state.js'
const app = createApp({})
const getMockStorage = () => {

View file

@ -1,7 +1,8 @@
import { createPinia, setActivePinia } from 'pinia'
import { createStore } from 'vuex'
import apiModule from 'src/modules/api.js'
import { useListsStore } from 'src/stores/lists.js'
import { createStore } from 'vuex'
setActivePinia(createPinia())
const store = useListsStore()

View file

@ -1,8 +1,9 @@
import { HttpResponse, http } from 'msw'
import { createPinia, setActivePinia } from 'pinia'
import { useOAuthStore } from 'src/stores/oauth.js'
import { createApp } from 'vue'
import { createStore } from 'vuex'
import { useOAuthStore } from 'src/stores/oauth.js'
import {
authApis,
injectMswToTest,