Socket
Socket
Sign inDemoInstall

@jest/types

Package Overview
Dependencies
11
Maintainers
7
Versions
94
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @jest/types


Version published
Weekly downloads
57M
decreased by-19.39%
Maintainers
7
Install size
231 kB
Created
Weekly downloads
 

Package description

What is @jest/types?

The @jest/types package provides TypeScript definitions and utility types for Jest, a popular JavaScript testing framework. It includes types for Jest configuration, global variables, and other utilities that help in creating type-safe test environments and extending Jest functionalities.

What are @jest/types's main functionalities?

Config

Defines types for Jest configuration options. This allows for type-safe Jest configuration files, ensuring that any configuration options passed to Jest are valid.

{"globals": {"myGlobal": "value"}, "testMatch": ["**/__tests__/**/*.js?(x)", "**/?(*.)+(spec|test).js?(x)"]}

Global

Provides types for Jest's global variables and functions, such as 'describe', 'it', and 'expect'. This is useful for creating custom global setups or mocks in a type-safe manner.

"declare var jest: jest.Jest"

Mock

Includes types for Jest's mocking utilities, enabling developers to create and manipulate mocks with full TypeScript support.

"const mockedFunction: jest.Mock = jest.fn()"

Other packages similar to @jest/types

Changelog

Source

25.4.0

  • [expect] Support async functions in toThrow (#9817)
  • [jest-console] Add code frame to console.error and console.warn (#9741)
  • [jest-runtime, jest-jasmine2, jest-circus] Experimental, limited ECMAScript Modules support (#9772 & #9842)

Fixes

  • [expect] Restore support for passing functions to toHaveLength matcher (#9796)
  • [jest-changed-files] --only-changed should include staged files (#9799)
  • [jest-circus] Throw on nested test definitions (#9828)
  • [jest-each] each will throw an error when called with too many arguments (#9818)
  • [jest-runner] Don't print warning to stdout when using --json (#9843)

Chore & Maintenance

  • [*] Do not generate TypeScript declaration source maps (#9822)
  • [*] Transpile code for Node 8.3, not 8.0 (#9827)

FAQs

Last updated on 19 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc