fix: fix regression in npm/vue (#23954)

This commit is contained in:
Lachlan Miller
2022-09-24 02:23:06 +10:00
committed by GitHub
parent 17556de482
commit 78779a2db1
3 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import { mount } from '@cypress/vue'
import { h, defineComponent } from 'vue'
describe('smoke test', () => {
it('mounts with no options', () => {
const comp = defineComponent({
setup () {
return () => h('div', 'hello world')
},
})
mount(comp)
cy.get('div').contains('hello world')
})
})

View File

@@ -324,7 +324,7 @@ export function mount<
>
// implementation
export function mount (componentOptions: any, options: any) {
export function mount (componentOptions: any, options: any = {}) {
// TODO: get the real displayName and props from VTU shallowMount
const componentName = getComponentDisplayName(componentOptions)

View File

@@ -722,6 +722,7 @@ enum ErrorTypeEnum {
BAD_POLICY_WARNING_TOOLTIP
BROWSER_NOT_FOUND_BY_NAME
BROWSER_NOT_FOUND_BY_PATH
BROWSER_UNSUPPORTED_LAUNCH_OPTION
BUNDLE_ERROR
CANNOT_CONNECT_BASE_URL
CANNOT_CONNECT_BASE_URL_RETRYING