-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: vue 3 types, beta suffix & component name (#17508)
* fix: update test-utils dependency & remove beta suffix * test: add typescript in the tests * chore: add setup example to cypress vue * build: remove noEmit from tsconfig.json * fix: make bigger types * test: make functinoal and definecompoennt tested * ci: make circle run typechek on vue * test: typescript files * test: remove usage of regenerator-runtime * style: avoid using internal types of vtu + comment
- Loading branch information
Barthélémy Ledoux
authored
Jul 30, 2021
1 parent
13f792c
commit b4733a6
Showing
15 changed files
with
1,080 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...press/component/basic/hello/Hello-spec.js → ...press/component/basic/hello/Hello-spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/// <reference types="cypress" /> | ||
import Hello from './Hello.vue' | ||
import { mount } from '@cypress/vue' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { h } from 'vue' | ||
import { mount } from '@cypress/vue' | ||
import HelloWorld from './HelloWorld.vue' | ||
|
||
describe('HelloWorld', () => { | ||
it('normal mount', () => { | ||
mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) | ||
}) | ||
|
||
it('functional mount', () => { | ||
mount(() => h(HelloWorld, { msg: 'Hello Cypress' })) | ||
}) | ||
|
||
it('renders properly', () => { | ||
mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) | ||
cy.get('h1').should('contain', 'Hello Cypress') | ||
}) | ||
|
||
it('adds 1 when clicking the plus button', () => { | ||
mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) | ||
|
||
cy.get('button') | ||
.should('contain', '0') | ||
.click() | ||
.should('contain', '1') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<h1>{{ msg }}</h1> | ||
<button type="button" @click="count++">count is: {{ count }}</button> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { defineProps, ref } from 'vue' | ||
defineProps<{ | ||
msg: String, | ||
}>() | ||
const count = ref(0) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.