Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

jest-leak-detector

Package Overview
Dependencies
2
Maintainers
5
Versions
140
Issues
File Explorer

Advanced tools

jest-leak-detector

Module for verifying whether an object has been garbage collected or not.

    28.1.3latest

Version published
Maintainers
5
Weekly downloads
17,386,487
decreased by-3.63%

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

jest-leak-detector

Module for verifying whether an object has been garbage collected or not.

Internally creates a weak reference to the object, and forces garbage collection to happen. If the reference is gone, it meant no one else was pointing to the object.

Example

(async function () { let reference = {}; let isLeaking; const detector = new LeakDetector(reference); // Reference is held in memory. isLeaking = await detector.isLeaking(); console.log(isLeaking); // true // We destroy the only reference to the object. reference = null; // Reference is gone. isLeaking = await detector.isLeaking(); console.log(isLeaking); // false })();

FAQs

What is jest-leak-detector?

Module for verifying whether an object has been garbage collected or not.

Is jest-leak-detector popular?

The npm package jest-leak-detector receives a total of 14,064,986 weekly downloads. As such, jest-leak-detector popularity was classified as popular.

Is jest-leak-detector well maintained?

We found that jest-leak-detector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 5 open source maintainers collaborating on the project.

Last updated on 13 Jul 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc