Answer the question
In order to leave comments, you need to log in
Jest + TypeScript + Vue = crazy?
<template>
<li>
<a class="user-menu__link" @click.prevent="go(item.link)">{{item.text}}</a>
</li>
</template>
<script lang="ts">
import script from './script'
export default script
</script>
<style lang="scss" scoped>
@import 'styles';
</style>
import Vue from 'vue'
import { Prop, Emit, Component } from 'vue-property-decorator'
import { IMenuItem } from '../types.d' // Убираю этот импорт и все гуд O_o
@Component
export default class ListItem extends Vue {
@Prop({ type: Object, required: true })
item: IMenuItem
@Emit('go')
go(path: string = '/') {
this.$router.push({ path })
}
}
Answer the question
In order to leave comments, you need to log in
I solved it by renaming the types.d.ts file to types.ts .
The problem seems to be in jest-vue-preprocessor or @vue/test-utils (I haven't found it yet).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question