diff --git a/commitlint/tests/testHelpers.ts b/commitlint/tests/testHelpers.ts index c1809f76..e8d2f228 100644 --- a/commitlint/tests/testHelpers.ts +++ b/commitlint/tests/testHelpers.ts @@ -92,6 +92,12 @@ test("testing TypeHelpers.IsInstanceOf", () => { test("testing TypeHelpers.IsInstanceOf exceptions", () => { let strNull = null; expect(() => TypeHelpers.IsInstanceOf(strNull, String)).toThrowError("Invalid"); + expect(() => TypeHelpers.IsInstanceOf(strNull, String)).toThrowError("parameter"); + expect(() => TypeHelpers.IsInstanceOf(strNull, String)).toThrowError("null"); + let strUndefined = undefined; + expect(() => TypeHelpers.IsInstanceOf(strUndefined, String)).toThrowError("Invalid"); + expect(() => TypeHelpers.IsInstanceOf(strUndefined, String)).toThrowError("parameter"); + expect(() => TypeHelpers.IsInstanceOf(strUndefined, String)).toThrowError("undefined"); }); export function runCommitLintOnMsg(inputMsg: string) {