From 9c49f68f97e562c3a76908bf1d4e3697d22d1952 Mon Sep 17 00:00:00 2001 From: vector Date: Fri, 8 Dec 2023 10:20:42 +0800 Subject: [PATCH] fix: fix lint issue --- packages/utils/src/assert.spec.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/utils/src/assert.spec.ts b/packages/utils/src/assert.spec.ts index 4defd936..3e982452 100644 --- a/packages/utils/src/assert.spec.ts +++ b/packages/utils/src/assert.spec.ts @@ -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); });