获取文件夹内容时发生错误.
Vitaly Slobodin
编辑于
Most problems come due to a breaking change in Jest 27 and new fake timers implementation. Additional extra tick happens between Jest event hook. For instance, if our test validates the component loading state and we create a component in "beforeEach" hook the loading state will go away due to an extra tick in between "beforeEach" and "it" blocks. Another problem is changed Jest matchers for string and numbers. Jest 27 validates the type by default when we use matchers like "toContain", "toBe". The solution is to call "toString" function on expected values as VTU and Vue.js in general renders everything as strings.
名称 | 最后提交 | 最后更新 |
---|