fix: fix lint issue
This commit is contained in:
parent
441a25ed78
commit
9c49f68f97
@ -1,17 +1,16 @@
|
||||
import { assert, assertDefined, assertDefinedAndNotNull } from "./assert";
|
||||
|
||||
describe("assert", () => {
|
||||
|
||||
describe("assert", () => {
|
||||
it('assert should not throw an error when condition is truthy', () => {
|
||||
it("assert should not throw an error when condition is truthy", () => {
|
||||
expect(() => assert(true)).not.toThrow();
|
||||
});
|
||||
|
||||
it('assert should throw an error with default message when condition is falsy', () => {
|
||||
it("assert should throw an error with default message when condition is falsy", () => {
|
||||
expect(() => assert(false)).toThrowError("condition is not truthy");
|
||||
});
|
||||
|
||||
it('assert should throw an error with custom message when condition is falsy', () => {
|
||||
it("assert should throw an error with custom message when condition is falsy", () => {
|
||||
const errorMessage = "Custom error message";
|
||||
expect(() => assert(false, errorMessage)).toThrowError(errorMessage);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user