Skip to content
代码片段 群组 项目
  • Vitaly Slobodin's avatar
    c0c51201
    Fix EE specs for updating Jest 26 -> 27 · c0c51201
    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.
    c0c51201
    历史
    Fix EE specs for updating Jest 26 -> 27
    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.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
section_details_spec.js 3.24 KiB