Skip to content

Commit

Permalink
test: fix unexpected warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jun 21, 2024
1 parent 77d7217 commit de83c36
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 762 deletions.
10 changes: 5 additions & 5 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
"preview": "vite preview --port 4173"
},
"dependencies": {
"vue": "^3.4.23"
"vue": "^3.4.29"
},
"devDependencies": {
"@types/node": "^20.12.7",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/compiler-sfc": "^3.4.23",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/compiler-sfc": "^3.4.29",
"@vue/tsconfig": "^0.5.1",
"typescript": "~5.3.3",
"vite": "^5.2.9",
"vite": "^5.3.1",
"vue-router": "workspace:*",
"vue-tsc": "^1.8.27"
"vue-tsc": "^2.0.21"
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
/**
* @vitest-environment jsdom
* @vitest-environment happy-dom
*/
import { createDom, newRouter as createRouter } from '../utils'
import { newRouter as createRouter } from '../utils'
import { mount } from '@vue/test-utils'
import { inject } from 'vue'
import { mockWarn } from '../vitest-mock-warn'
import type { Router } from '../../src'
import { describe, expect, it, beforeAll } from 'vitest'
import { createMemoryHistory, type Router } from '../../src'
import { describe, expect, it } from 'vitest'

describe('inject() within navigation guards', () => {
mockWarn()
beforeAll(() => {
createDom()
})

const PageComponent = {
template: `<div>Page</div>`,
Expand Down Expand Up @@ -97,6 +94,7 @@ describe('inject() within navigation guards', () => {
it('beforeRouteUpdate', async () => {
expect.assertions(1)
const router = createRouter({
history: createMemoryHistory(),
routes: [
{
path: '/',
Expand All @@ -118,6 +116,7 @@ describe('inject() within navigation guards', () => {
it('beforeRouteLeave', async () => {
expect.assertions(1)
const router = createRouter({
history: createMemoryHistory(),
routes: [
{ path: '/', component: PageComponent },
{
Expand Down
19 changes: 10 additions & 9 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"attributes": "vetur/attributes.json"
},
"dependencies": {
"@vue/devtools-api": "^6.5.1"
"@vue/devtools-api": "^6.6.3"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.40.1",
Expand All @@ -123,30 +123,31 @@
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@types/jsdom": "^21.1.6",
"@types/nightwatch": "^2.3.30",
"@vitejs/plugin-vue": "^5.0.4",
"@types/jsdom": "^21.1.7",
"@types/nightwatch": "^2.3.31",
"@vitejs/plugin-vue": "^5.0.5",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"@vue/compiler-sfc": "^3.4.23",
"@vue/server-renderer": "^3.4.23",
"@vue/test-utils": "^2.4.4",
"@vue/compiler-sfc": "^3.4.29",
"@vue/server-renderer": "^3.4.29",
"@vue/test-utils": "^2.4.6",
"browserstack-local": "^1.5.5",
"chromedriver": "^121.0.2",
"connect-history-api-fallback": "^1.6.0",
"conventional-changelog-cli": "^2.1.1",
"dotenv": "^16.4.5",
"faked-promise": "^2.2.2",
"geckodriver": "^3.2.0",
"happy-dom": "^14.12.3",
"nightwatch": "^2.6.22",
"nightwatch-helpers": "^1.2.0",
"rimraf": "^5.0.7",
"rollup": "^3.29.4",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-typescript2": "^0.36.0",
"typescript": "~5.3.3",
"vite": "^5.2.9",
"vite": "^5.3.1",
"vitest": "^1.6.0",
"vue": "^3.4.23"
"vue": "^3.4.29"
}
}
Loading

0 comments on commit de83c36

Please sign in to comment.