📅  最后修改于: 2022-03-11 15:01:13.012000             🧑  作者: Mango
test("Test description", () => {
expect.assertions(2);
try {
throw new TypeError("UNKNOWN ERROR");
} catch (e) {
expect(e).toThrow(TypeError);
expect(e.message).toBe("UNKNOWN ERROR");
}
});