// someFunction.tsexportfunctionsomeFunction(shouldThrow:boolean):void {if (shouldThrow) {thrownewError("I am an error!") }}// someFunction.test.tsimport { someFunction } from"./someFunction"test("should throw an error", () => {expect(() =>someFunction(true)).toThrow("I am an error!")})test("should not throw an error", () => {expect(() =>someFunction(false)).not.toThrow()})