isVueInstance已过时,将在以后的版本中删除

问题描述 投票:0回答:1

我对JEST不熟悉,并且收到了以上警告。我想知道哪种方法已经被弃用。

这是我正在做的测试:

it('is instantiated', () => {
expect(wrapper.isVueInstance()).toBeTruthy();

});

enter image description here

jestjs deprecated
1个回答
0
投票

我检查了https://vue-test-utils.vuejs.org/api/wrapper/#isvisible,他们说:

Assert Wrapper是Vue实例。

所以最后一件事是:

it('is instantiated', () => {
    expect(wrapper).toBeTruthy();
  });
© www.soinside.com 2019 - 2024. All rights reserved.