From 1c7e63f67820620f5f6bff9f48cc4b5f7cc06630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Mon, 2 Oct 2023 16:40:01 +0100 Subject: [PATCH] fix(type): set any type to support methods --- package-lock.json | 4 ++-- package.json | 2 +- src/globals/Assert.ts | 28 ++++++++++++++-------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 131add5..c27d44e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/test", - "version": "4.9.0", + "version": "4.9.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/test", - "version": "4.9.0", + "version": "4.9.1", "license": "MIT", "dependencies": { "@japa/assert": "^1.4.1", diff --git a/package.json b/package.json index 1ced182..fbb7b25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/test", - "version": "4.9.0", + "version": "4.9.1", "description": "The Athenna test runner. Built on top of Japa.", "license": "MIT", "author": "João Lenon ", diff --git a/src/globals/Assert.ts b/src/globals/Assert.ts index 6f8cb4e..abd1314 100644 --- a/src/globals/Assert.ts +++ b/src/globals/Assert.ts @@ -136,30 +136,30 @@ declare module '@japa/assert' { /** * Assert that the given mock was called. */ - called(mock: SinonSpy): void + called(mock: any): void /** * Assert that the given mock was not called. */ - notCalled(mock: SinonSpy): void + notCalled(mock: any): void /** * Assert that the given mock was called only once. */ - calledOnce(mock: SinonSpy): void + calledOnce(mock: any): void /** * Assert that the given mock was called the * determined number of times. */ - calledTimes(mock: SinonSpy, times: number): void + calledTimes(mock: any, times: number): void /** * Assert that the given mock was called with the * determined arguments. */ - calledWith(mock: SinonSpy, ...args: any[]): void + calledWith(mock: any, ...args: any[]): void /** * Assert that the given mock was not called with the * determined arguments. */ - notCalledWith(mock: SinonSpy, ...args: any[]): void + notCalledWith(mock: any, ...args: any[]): void /** * Assert that the given mock was called with the * arguments matching some of the given arguments. @@ -172,7 +172,7 @@ declare module '@japa/assert' { * assert.calledWithMatch(console.log, 'hello', 'world') // passes * ``` */ - calledWithMatch(mock: SinonSpy, ...args: any[]): void + calledWithMatch(mock: any, ...args: any[]): void /** * Assert that the given mock was not called with the * arguments matching some of the given arguments. @@ -185,37 +185,37 @@ declare module '@japa/assert' { * assert.notCalledWithMatch(console.log, 'hello', 'world') // fails * ``` */ - notCalledWithMatch(mock: SinonSpy, ...args: any[]): void + notCalledWithMatch(mock: any, ...args: any[]): void /** * Assert that the given mock was called only once * with the determined arguments. */ - calledOnceWith(mock: SinonSpy, ...args: any[]): void + calledOnceWith(mock: any, ...args: any[]): void /** * Assert that the given mock was called the * determined number of times with always the determined * arguments. */ - calledTimesWith(mock: SinonSpy, times: number, ...args: any[]): void + calledTimesWith(mock: any, times: number, ...args: any[]): void /** * Assert that the given mock was called before * an other determined mock. */ - calledBefore(mock: SinonSpy, beforeMock: SinonSpy): void + calledBefore(mock: any, beforeMock: any): void /** * Assert that the given mock was not called before * an other determined mock. */ - notCalledBefore(mock: SinonSpy, beforeMock: SinonSpy): void + notCalledBefore(mock: any, beforeMock: any): void /** * Assert that the given mock was called after * an other determined mock. */ - calledAfter(mock: SinonSpy, afterMock: SinonSpy): void + calledAfter(mock: any, afterMock: any): void /** * Assert that the given mock was not called after * an other determined mock. */ - notCalledAfter(mock: SinonSpy, afterMock: SinonSpy): void + notCalledAfter(mock: any, afterMock: any): void } }