So i tried to setup cypress with vue3, vite and ty...
# vue
p
So i tried to setup cypress with vue3, vite and typescript. i used this as a guildline: https://github.com/cypress-io/cypress-component-testing-apps/tree/main/vue3-vite-ts But all i get is an endless loading screen.
ATest.vue
Copy code
ts
<template>
  <div class="test">{{ $props.msg }}</div>
  <div>Count: {{ count }}</div>
  <button @click="count++">Click me</button>
</template>
<script lang="ts" setup>
import { ref } from 'vue'

defineProps({
  msg: {
    type: String,
    default: 'Test',
  },
})

const count = ref(0)
</script>
<style scoped>
.text {
  color: red;
}
</style>
this is my testfile:
ATest.cy.ts
Copy code
ts
import ATest from './ATest.vue'

describe('ATest.vue', () => {
  it('should mount', () => {
    cy.mount(ATest, {
      props: {
        msg: '324'
      }
    });
    cy.get('div')
  });
});
anyone any idea? or had the same issue?
4 Views