Comparing version 1.0.0 to 1.0.1
@@ -5,2 +5,8 @@ # Changelog | ||
### [1.0.1](https://github.com/therealparmesh/snoop/compare/v1.0.0...v1.0.1) (2020-07-16) | ||
### Bug Fixes | ||
- types ([5e20099](https://github.com/therealparmesh/snoop/commit/5e20099d63776acef097c846d91a7ae8402940d3)) | ||
## 1.0.0 (2020-07-14) | ||
@@ -10,2 +16,2 @@ | ||
- initial commit ([08d83e1](https://github.com/therealparmesh/snoop/commit/08d83e1fb62a498d77098559f392d53310e614de)) | ||
- initial commit ([7f518d5](https://github.com/therealparmesh/snoop/commit/7f518d50dedac45c163cfbd6e200344c7978f293)) |
{ | ||
"name": "snoop", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Easy breezy test spies fo sheezy.", | ||
@@ -5,0 +5,0 @@ "repository": "github:therealparmesh/snoop", |
@@ -1,2 +0,6 @@ | ||
export interface Call<T extends (...args: any) => any> { | ||
export interface Fn { | ||
(...args: any): any; | ||
} | ||
export interface Call<T extends Fn> { | ||
arguments: Parameters<T>; | ||
@@ -7,5 +11,3 @@ result: ReturnType<T>; | ||
export function snoop<T extends (...args: any) => any>( | ||
fn: T, | ||
): { | ||
export interface Snoop<T extends Fn> { | ||
fn: T; | ||
@@ -20,6 +22,8 @@ testID: number; | ||
lastCall: Call<T>; | ||
calledBefore: (other: typeof snoop) => boolean; | ||
calledAfter: (other: typeof snoop) => boolean; | ||
calledImmediatelyBefore: (other: typeof snoop) => boolean; | ||
calledImmediatelyAfter: (other: typeof snoop) => boolean; | ||
}; | ||
calledBefore: (other: Snoop<T>) => boolean; | ||
calledAfter: (other: Snoop<T>) => boolean; | ||
calledImmediatelyBefore: (other: Snoop<T>) => boolean; | ||
calledImmediatelyAfter: (other: Snoop<T>) => boolean; | ||
} | ||
export function snoop<T extends Fn>(fn: T): Snoop<T>; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12934
321
0