如何在vue-test-utils和jest中模拟$ nuxt对象

时间:2020-06-16 07:33:28

标签: vue.js jestjs vuex nuxt.js vue-test-utils

我正在使用vue-test-utils和jest来测试我的代码。 我的测试运行正常,除非通过下面的代码

select * from employee  where  (group_id  && '{2,8}');

它会给我这个错误

$nuxt.$store.commit("device/saveState", {
      id: this.$.id,
      key: this.$.ac_key,
      power: this.$.ac_power,
      mode: this.$.ac_mode,
      temp: this.$.ac_temp,
      wind: this.$.ac_wind
    })

0 个答案:

没有答案