Socket
Socket
Sign inDemoInstall

babel-plugin-jest-hoist

Package Overview
Dependencies
21
Maintainers
6
Versions
187
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-jest-hoist

Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/main/packages/babel-jest)


Version published
Weekly downloads
20M
decreased by-16.94%
Maintainers
6
Created
Weekly downloads
 

Changelog

Source

28.1.3

Features

  • [jest-leak-detector] Use native FinalizationRegistry when it exists to get rid of external C dependency (#12973)

Fixes

  • [jest-changed-files] Fix a lock-up after repeated invocations (#12757)
  • [@jest/expect-utils] Fix deep equality of ImmutableJS OrderedSets (#12977)
  • [jest-mock] Add index signature support for spyOn types (#13013, #13020)
  • [jest-snapshot] Fix indentation of awaited inline snapshots (#12986)

Chore & Maintenance

  • [*] Replace internal usage of pretty-format/ConvertAnsi with jest-serializer-ansi-escapes (#12935, #13004)
  • [docs] Update spyOn docs (#13000)

Readme

Source

babel-plugin-jest-hoist

Babel plugin to hoist jest.disableAutomock, jest.enableAutomock, jest.unmock, jest.mock, calls above import statements. This plugin is automatically included when using babel-jest.

Installation

$ yarn add --dev babel-plugin-jest-hoist

Usage

module.exports = {
  plugins: ['jest-hoist'],
};

Via CLI

$ babel --plugins jest-hoist script.js

Via Node API

require('@babel/core').transform('code', {
  plugins: ['jest-hoist'],
});

FAQs

Last updated on 13 Jul 2022

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