New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-zone-patch

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-zone-patch

Enables Jest functions to be run within Zone.js context

0.0.10
latest
npm
Version published
Weekly downloads
5.7K
5.68%
Maintainers
1
Weekly downloads
 
Created
Source

jest-zone-patch

Enables Jest functions to be run within Zone.js context, specifically for Angular apps.

Usage

Place it in your setupJestTestFramework.ts (or so) file

import 'jest-zone-patch';

And run it as Jest's setupTestFrameworkScriptFile:

"jest": {
  "setupTestFrameworkScriptFile": "<rootDir>/src/setupJestTestFramework.ts"
}

It's crucial to run this patch here, because at this point patched functions like test or describe are available in global scope.

FAQs

Package last updated on 10 Dec 2018

Did you know?

Socket

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