如何将AVA测试添加到Nuxt.JS

时间:2020-10-09 11:27:19

标签: javascript unit-testing vue.js nuxt.js ava

将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>

0 个答案:

没有答案