Skip to content
代码片段 群组 项目
Vitaly Slobodin 的头像
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.
deed0888
历史
名称 最后提交 最后更新