Socket
Socket
Sign inDemoInstall

@jest/types

Package Overview
Dependencies
3
Maintainers
7
Versions
96
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @jest/types


Version published
Weekly downloads
55M
decreased by-17.87%
Maintainers
7
Install size
237 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

24.8.0

Features

  • [jest-circus] Bind to Circus events via an optional event handler on any custom env (#8344)
  • [expect] Improve report when matcher fails, part 15 (#8281)
  • [jest-cli] Update --forceExit and "did not exit for one second" message colors (#8329)
  • [expect] Improve report when matcher fails, part 16 (#8306)
  • [jest-runner] Pass docblock pragmas to TestEnvironment constructor (#8320)
  • [docs] Add DynamoDB guide (#8319)
  • [expect] Improve report when matcher fails, part 17 (#8349)
  • [expect] Improve report when matcher fails, part 18 (#8356)
  • [expect] Improve report when matcher fails, part 19 (#8367)

Fixes

  • [jest-each] Fix bug with placeholder values (#8289)
  • [jest-snapshot] Inline snapshots: do not indent empty lines (#8277)
  • [@jest/runtime, @jest/transform] Allow custom transforms for JSON dependencies (#8278)
  • [jest-core] Make detectOpenHandles imply runInBand (#8283)
  • [jest-haste-map] Fix the mapper option which was incorrectly ignored (#8299)
  • [jest-jasmine2] Fix describe return value warning being shown if the describe function throws (#8335)
  • [jest-environment-jsdom] Re-declare global prototype of JSDOMEnvironment (#8352)
  • [jest-snapshot] Handle arrays when merging snapshots (#7089)
  • [expect] Extract names of async and generator functions (#8362)
  • [jest-runtime] Fix virtual mocks not being unmockable after previously being mocked (#8396)
  • [jest-transform] Replace special characters in transform cache filenames to support Windows (#8353)
  • [jest-config] Allow exactly one project (#7498)

Chore & Maintenance

  • [expect] Fix label and add opposite assertion for toEqual tests (#8288)
  • [docs] Mention Jest MongoDB Preset (#8318)
  • [@jest/reporters] Migrate away from istanbul-api (#8294)
  • [*] Delete obsolete emails tag from header comment in test files (#8377)
  • [expect] optimize compare nodes (#8368)
  • [docs] Fix typo in MockFunctionAPI.md (#8406)
  • [LICENSE] Follow copyright header guidelines and delete For Jest software (#8428)

Performance

  • [jest-runtime] Fix module registry memory leak (#8282)
  • [jest-resolve] optimize resolve module path (#8388)
  • [jest-resolve] cache current directory (#8412)
  • [jest-get-type] Simplify checking for primitive (#8416)

FAQs

Last updated on 05 May 2019

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