将Ava测试添加到Nuxt JS的最佳方法是什么?我当前要跟踪数据值的变化。例如,在测试中,我想单击按钮,并确保将值更改为2。什么是最好的方法?
Index.vue
<template>
<div>
<button class="single-button" @click="value = 2">Test</button>
</div>
</template>
<script>
export default{
data(){
return{
value: 0
}
}
}
</script>