Kononov Space
  • Main
  • Articles
  • Tech Recipes
  • About me
  • Contacts
  • Conferences
  • About Project
Subscribe

jest

A collection of 1 post
[RECIPE]: Check error throw in jest
recipe

[RECIPE]: Check error throw in jest

Jest is something which millions of people uses everyday, a lot of questions are answered. But I keep finding something new for me every day. This is not gonna work: describe('throw test', () => { it('should throw the error', () => { expect(throwingFunc()).toThrow(); }); }); Test will fail with the error you are looking
Jun 12, 2020 1 min read
Kononov Space © 2023
Powered by Ghost