Jest: Mock React Components

Sdílet
Vložit
  • čas přidán 23. 08. 2024

Komentáře • 6

  • @onkarnawale8951
    @onkarnawale8951 Před 3 lety

    Can you tell how to do... If same situation using jest and enzyme.. Without react testing library and for functional components.

  • @aeronstore7564
    @aeronstore7564 Před 4 lety +2

    why not use functional component instead of class component?

    • @dhanvinpatel2456
      @dhanvinpatel2456 Před 3 lety

      do you know how can test functional component with
      useState

  • @iankitverma
    @iankitverma Před 2 lety

    How about coverage. How to get coverage of mocked Components?

  • @phulesudarshan
    @phulesudarshan Před 3 lety

    Can we move jest.mock lines in a common file to be used as common mock for multiple components?

  • @tentacle8148
    @tentacle8148 Před 3 lety

    Function components are much more performance efficient