Jest Tutorial: Start with Unit Testing in JavaScript & Write Better Code

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024

Комментарии • 4

  • @jch7242
    @jch7242 20 дней назад

    This is exactly I've been looking for! Thanks!

  • @PieterWigboldus
    @PieterWigboldus 6 месяцев назад +1

    I have used jest s lot, but you dont need that always.
    Try always the native node test runner.
    Works good for normal JavaScript code.
    If you use a framework in the frontend, like react, and work with the dom, than tools like jest, vitest, etc is useful.
    Check what the tool weak and strong points are.
    Jest is easy, many have used it, but if you want to write ESM code without a build step, you have to choose something else, like the native test runner for backend and libraries, or vitest for frontend.

    • @camelCaseDev
      @camelCaseDev  6 месяцев назад +1

      Thanks for your insight! :-) The native Node test runner can indeed be a great choice for straightforward JavaScript without the additional features Jest provides. It's all about using the right tool for the job, and as you mentioned, understanding the strengths and weaknesses of each option is key. For ESM code without a build step, alternatives like the native test runner or Vitest are worth exploring. Appreciate your input!

  • @2gbeh
    @2gbeh 6 месяцев назад +1

    🇳🇬