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

Javascript 如何将AVA测试添加到Nuxt.JS,javascript,unit-testing,vue.js,nuxt.js,ava,Javascript,Unit Testing,Vue.js,Nuxt.js,Ava,向Nuxt JS添加Ava测试的最佳方法是什么?我当前希望跟踪数据值的更改。例如,在测试中,我想单击按钮,并确保值更改为2。最好的方法是什么 Index.vue <template> <div> <button class="single-button" @click="value = 2">Test</button> </div> </template> <script&g

向Nuxt JS添加Ava测试的最佳方法是什么?我当前希望跟踪数据值的更改。例如,在测试中,我想单击按钮,并确保值更改为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
}
}
}