Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to vitest v0.24.3 #1823

Merged
merged 1 commit into from Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -55,7 +55,7 @@
"unplugin-vue-components": "0.22.8",
"vite": "3.1.8",
"vitepress": "0.22.4",
"vitest": "0.22.1",
"vitest": "0.24.3",
"vue": "3.2.41",
"vue-class-component": "8.0.0-rc.1",
"vue-router": "4.1.5",
Expand Down
35 changes: 26 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions tests/features/compat.spec.ts
Expand Up @@ -3,7 +3,7 @@ import * as mockVue from '@vue/compat'
import { mount } from '../../src'

vi.mock('vue', () => mockVue)
const { configureCompat, extend, defineComponent, h } = mockVue
const { configureCompat, defineComponent, h } = mockVue
// @ts-expect-error @vue/compat does not expose default export in types
const Vue = mockVue.default

Expand Down Expand Up @@ -46,7 +46,7 @@ describe('@vue/compat build', () => {
it('finds components declared with legacy Vue.extend', () => {
configureCompat({ MODE: 3, GLOBAL_EXTEND: 'suppress-warning' })

const LegacyComponent = extend({
const LegacyComponent = Vue.extend({
template: '<div>LEGACY</div>'
})

Expand Down Expand Up @@ -97,7 +97,7 @@ describe('@vue/compat build', () => {
COMPONENT_FUNCTIONAL: 'suppress-warning'
})

const Component = extend({
const Component = Vue.extend({
functional: true,
render: () => h('div', 'test')
})
Expand All @@ -112,7 +112,7 @@ describe('@vue/compat build', () => {
GLOBAL_EXTEND: 'suppress-warning'
})

const Foo = extend({
const Foo = Vue.extend({
name: 'Foo',
template: '<div>original</div>'
})
Expand Down Expand Up @@ -147,7 +147,7 @@ describe('@vue/compat build', () => {
template: '<div>original</div>'
}

const FooStub = extend({ template: '<div>stubbed</div>' })
const FooStub = Vue.extend({ template: '<div>stubbed</div>' })

const Component = {
components: { NamedAsNotFoo: Foo },
Expand All @@ -172,7 +172,7 @@ describe('@vue/compat build', () => {
GLOBAL_MOUNT: 'suppress-warning'
})

const Component = extend({
const Component = Vue.extend({
data() {
return { foo: 'bar' }
},
Expand Down
5 changes: 4 additions & 1 deletion vitest.config.ts
Expand Up @@ -35,6 +35,9 @@ export default defineConfig({
},
resolve: {
extensions: ['.vue', '.js', '.json', '.jsx', '.ts', '.tsx', '.node'],
dedupe: ['vue', '@vue/compat']
dedupe: ['vue', '@vue/compat'],
alias: {
'@vue/compat': '@vue/compat/dist/vue.esm-bundler.js'
}
}
})