fix tests
This commit is contained in:
parent
745981e25f
commit
b37b75c473
6 changed files with 34 additions and 30 deletions
|
|
@ -110,6 +110,7 @@ export const buildSwPlugin = ({ swSrc, swDest }) => {
|
|||
order: 'post',
|
||||
sequential: true,
|
||||
async handler() {
|
||||
if (process.env.VITEST) return
|
||||
console.info('Building service worker for production')
|
||||
await build(config)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
"localforage": "1.10.0",
|
||||
"parse-link-header": "2.0.0",
|
||||
"phoenix": "1.8.1",
|
||||
"pinia": "^3.0.0",
|
||||
"pinia": "^3.0.4",
|
||||
"punycode.js": "2.3.1",
|
||||
"qrcode": "1.5.4",
|
||||
"querystring-es3": "0.2.1",
|
||||
|
|
|
|||
12
test/fixtures/setup_test.js
vendored
12
test/fixtures/setup_test.js
vendored
|
|
@ -2,7 +2,12 @@ import { config } from '@vue/test-utils'
|
|||
import { createMemoryHistory, createRouter } from 'vue-router'
|
||||
import VueVirtualScroller from 'vue-virtual-scroller'
|
||||
|
||||
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||
import Status from 'src/components/status/status.vue'
|
||||
import StillImage from 'src/components/still-image/still-image.vue'
|
||||
|
||||
import makeMockStore from './mock_store'
|
||||
import { createTestingPinia } from '@pinia/testing'
|
||||
|
||||
import routes from 'src/boot/routes'
|
||||
|
||||
|
|
@ -37,8 +42,13 @@ const getDefaultOpts = ({
|
|||
(Vue) => {
|
||||
Vue.directive('body-scroll-lock', {})
|
||||
},
|
||||
createTestingPinia(),
|
||||
],
|
||||
components: {},
|
||||
components: {
|
||||
RichContent,
|
||||
Status,
|
||||
StillImage,
|
||||
},
|
||||
stubs: {
|
||||
I18nT: true,
|
||||
teleport: true,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ describe('Draft saving', () => {
|
|||
},
|
||||
)
|
||||
|
||||
it('should auto-save if it is enabled', async function () {
|
||||
it.only('should auto-save if it is enabled', async function () {
|
||||
vi.useFakeTimers()
|
||||
const wrapper = mount(PostStatusForm, mountOpts())
|
||||
const store = useMergedConfigStore()
|
||||
|
|
|
|||
|
|
@ -132,12 +132,6 @@ export default defineConfig(async ({ mode, command }) => {
|
|||
},
|
||||
}),
|
||||
vueJsx(),
|
||||
DevTools({
|
||||
build: {
|
||||
withApp: true, // generate DevTools output during `vite build`
|
||||
// outDir: 'custom-dir', // optional, defaults to Vite's build.outDir
|
||||
},
|
||||
}),
|
||||
buildSwPlugin({ swSrc, swDest }),
|
||||
swMessagesPlugin(),
|
||||
emojisPlugin(),
|
||||
|
|
@ -162,7 +156,6 @@ export default defineConfig(async ({ mode, command }) => {
|
|||
],
|
||||
css: {
|
||||
devSourcemap: true,
|
||||
transformer: 'lightningcss',
|
||||
},
|
||||
resolve: {
|
||||
alias,
|
||||
|
|
@ -185,10 +178,10 @@ export default defineConfig(async ({ mode, command }) => {
|
|||
__VUE_PROD_DEVTOOLS__: false,
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
|
||||
},
|
||||
// devtools: { enabled: true },
|
||||
build: {
|
||||
sourcemap: true,
|
||||
rolldownOptions: {
|
||||
devtools: {}, // enable devtools mode
|
||||
input: {
|
||||
main: 'index.html',
|
||||
},
|
||||
|
|
|
|||
38
yarn.lock
38
yarn.lock
|
|
@ -3137,19 +3137,19 @@
|
|||
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz#cbe97fe0162b365edc1dba80e173f90492535343"
|
||||
integrity sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==
|
||||
|
||||
"@vue/devtools-api@^7.7.2":
|
||||
version "7.7.7"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-7.7.7.tgz#5ef5f55f60396220725a273548c0d7ee983d5d34"
|
||||
integrity sha512-lwOnNBH2e7x1fIIbVT7yF5D+YWhqELm55/4ZKf45R9T8r9dE2AIOy8HKjfqzGsoTHFbWbr337O4E0A0QADnjBg==
|
||||
"@vue/devtools-api@^7.7.7":
|
||||
version "7.7.9"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-7.7.9.tgz#999dbea50da6b00cf59a1336f11fdc2b43d9e063"
|
||||
integrity sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g==
|
||||
dependencies:
|
||||
"@vue/devtools-kit" "^7.7.7"
|
||||
"@vue/devtools-kit" "^7.7.9"
|
||||
|
||||
"@vue/devtools-kit@^7.7.7":
|
||||
version "7.7.7"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-kit/-/devtools-kit-7.7.7.tgz#41a64f9526e9363331c72405544df020ce2e3641"
|
||||
integrity sha512-wgoZtxcTta65cnZ1Q6MbAfePVFxfM+gq0saaeytoph7nEa7yMXoi6sCPy4ufO111B9msnw0VOWjPEFCXuAKRHA==
|
||||
"@vue/devtools-kit@^7.7.9":
|
||||
version "7.7.9"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-kit/-/devtools-kit-7.7.9.tgz#bc218a815616e8987df7ab3e10fc1fb3b8706c58"
|
||||
integrity sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA==
|
||||
dependencies:
|
||||
"@vue/devtools-shared" "^7.7.7"
|
||||
"@vue/devtools-shared" "^7.7.9"
|
||||
birpc "^2.3.0"
|
||||
hookable "^5.5.3"
|
||||
mitt "^3.0.1"
|
||||
|
|
@ -3157,10 +3157,10 @@
|
|||
speakingurl "^14.0.1"
|
||||
superjson "^2.2.2"
|
||||
|
||||
"@vue/devtools-shared@^7.7.7":
|
||||
version "7.7.7"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-shared/-/devtools-shared-7.7.7.tgz#ff14aa8c1262ebac8c0397d3b09f767cd489750c"
|
||||
integrity sha512-+udSj47aRl5aKb0memBvcUG9koarqnxNM5yjuREvqwK6T3ap4mn3Zqqc17QrBFTqSMjr3HK1cvStEZpMDpfdyw==
|
||||
"@vue/devtools-shared@^7.7.9":
|
||||
version "7.7.9"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-shared/-/devtools-shared-7.7.9.tgz#fa4c096b744927081a7dda5fcf05f34b1ae6ca14"
|
||||
integrity sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA==
|
||||
dependencies:
|
||||
rfdc "^1.4.1"
|
||||
|
||||
|
|
@ -7551,12 +7551,12 @@ pify@^4.0.1:
|
|||
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
|
||||
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
|
||||
|
||||
pinia@^3.0.0:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/pinia/-/pinia-3.0.3.tgz#f412019bdeb2f45e85927b432803190343e12d89"
|
||||
integrity sha512-ttXO/InUULUXkMHpTdp9Fj4hLpD/2AoJdmAbAeW2yu1iy1k+pkFekQXw5VpC0/5p51IOR/jDaDRfRWRnMMsGOA==
|
||||
pinia@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/pinia/-/pinia-3.0.4.tgz#75dde12784a61e34c1fa6abcd13c1a1061c360c0"
|
||||
integrity sha512-l7pqLUFTI/+ESXn6k3nu30ZIzW5E2WZF/LaHJEpoq6ElcLD+wduZoB2kBN19du6K/4FDpPMazY2wJr+IndBtQw==
|
||||
dependencies:
|
||||
"@vue/devtools-api" "^7.7.2"
|
||||
"@vue/devtools-api" "^7.7.7"
|
||||
|
||||
pirates@^4.0.6:
|
||||
version "4.0.7"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue