JEST Espere tipo de erro

test("Test description", () => {
  expect.assertions(2);
  try {
      throw new TypeError("UNKNOWN ERROR");
  } catch (e) {
  	expect(e).toThrow(TypeError);
    expect(e.message).toBe("UNKNOWN ERROR");
  }  
});
gaz_edge