Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/jest-when

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/jest-when - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

29

jest-when/index.d.ts

@@ -5,24 +5,19 @@ // Type definitions for jest-when 1.1

// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// TypeScript Version: 3.0
/// <reference types="jest" />
export interface When {
<T>(fn: jest.Mocked<T> | jest.Mock<T>): When;
export interface WhenMock<T = any, Y extends any[] = any> extends jest.Mock<T, Y> {
calledWith(...matchers: Y): WhenMock<T, Y>;
expectCalledWith(...matchers: Y): WhenMock<T, Y>;
mockReturnValue(value: T): WhenMock<T, Y>;
mockReturnValueOnce(value: T): WhenMock<T, Y>;
mockResolvedValue(value: T | PromiseLike<T>): WhenMock<Promise<T>, Y>;
mockResolvedValueOnce(value: T | PromiseLike<T>): WhenMock<Promise<T>, Y>;
mockRejectedValue(value: T | PromiseLike<T>): WhenMock<Promise<T>, Y>;
mockRejectedValueOnce(value: T | PromiseLike<T>): WhenMock<Promise<T>, Y>;
}
// due to no-unnecessary-generics lint rule, the generics have been replaced with 'any'
// calledWith<T>(...matchers: any[]): PartialMockInstance<T>;
// expectCalledWith<T>(...matchers: any[]): PartialMockInstance<T>;
calledWith(...matchers: any[]): When;
export type When = <T, Y extends any[]>(fn: jest.Mock<T, Y>) => WhenMock<T, Y>;
expectCalledWith(...matchers: any[]): When;
mockReturnValue: (value: any) => jest.MockInstance<any>['mockReturnValue'] & When;
mockReturnValueOnce: (value: any) => jest.MockInstance<any>['mockReturnValue'] & When;
mockResolvedValue: (value: any) => jest.MockInstance<any>['mockReturnValue'] & When;
mockResolvedValueOnce: (value: any) => jest.MockInstance<any>['mockReturnValue'] & When;
mockRejectedValue: (value: any) => jest.MockInstance<any>['mockReturnValue'] & When;
mockRejectedValueOnce: (value: any) => jest.MockInstance<any>['mockReturnValue'] & When;
}
export const when: When;
{
"name": "@types/jest-when",
"version": "1.1.2",
"version": "1.1.3",
"description": "TypeScript definitions for jest-when",

@@ -23,4 +23,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "62a7c94be90098e05aa56001b105d9e76355213e519f2969f55082966484c07c",
"typeScriptVersion": "2.3"
"typesPublisherContentHash": "dc44d38d68e70fe31b7a20a89f697a6b4a2797cc594527d2ee75620ea9d4aa61",
"typeScriptVersion": "3.0"
}

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for jest-when (https://github.com/timkindberg/jest-when#readme).
This package contains type definitions for jest-when ( https://github.com/timkindberg/jest-when#readme ).

@@ -12,3 +12,3 @@ # Details

Additional Details
* Last updated: Mon, 31 Dec 2018 18:25:27 GMT
* Last updated: Tue, 05 Feb 2019 01:10:04 GMT
* Dependencies: @types/jest

@@ -15,0 +15,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc