Skip to content

thymikee/jest-zone-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Enables Jest functions to be run within Zone.js context

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •