From dcda8a9a88358a7090901bfcc2e7eb8dcd51f4a8 Mon Sep 17 00:00:00 2001 From: Zoe Codez Date: Sun, 10 Nov 2024 20:52:34 -0600 Subject: [PATCH] fix --- testing/internal.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/internal.spec.ts b/testing/internal.spec.ts index 4f353dc..d0a61ae 100644 --- a/testing/internal.spec.ts +++ b/testing/internal.spec.ts @@ -35,9 +35,9 @@ describe("Fetch Extension", () => { describe("removeFn", () => { const internal = new InternalDefinition(); - const mockRemove: () => TBlackHole = jest.fn(() => ({}) as TBlackHole); it("should return a function with a remove property", () => { + const mockRemove: () => TBlackHole = jest.fn(() => ({}) as TBlackHole); const result = internal.removeFn(mockRemove); expect(typeof result).toBe("function"); @@ -45,6 +45,7 @@ describe("Fetch Extension", () => { }); it("should correctly call the remove function", () => { + const mockRemove: () => TBlackHole = jest.fn(() => ({}) as TBlackHole); const result = internal.removeFn(mockRemove); result(); // Call the function @@ -52,6 +53,7 @@ describe("Fetch Extension", () => { }); it("should allow calling remove via the returned function", () => { + const mockRemove: () => TBlackHole = jest.fn(() => ({}) as TBlackHole); const result = internal.removeFn(mockRemove); result.remove!(); // Call remove @@ -59,6 +61,7 @@ describe("Fetch Extension", () => { }); it("should support both destructured and non-destructured usage", () => { + const mockRemove: () => TBlackHole = jest.fn(() => ({}) as TBlackHole); // Destructured case const { remove } = internal.removeFn(mockRemove); remove!(); // Call remove