Skip to content

Demo repo for jest issue

Notifications You must be signed in to change notification settings

hmaracic/jest-babel-reset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jest-babel-reset

Demo repo for jest issue

The test case in this repo is an almost verbatim copy of the jest.resetModules() documentation example with a jest spy added.

const someUtilSpy = jest
  .spyOn(someUtil, "someUtil")
  .mockReturnValueOnce("Hello by spyOn!");

The spy does not count the calls to the someUtil method nor does it mock its return value.

If jest.resetModules() is removed from the beforeEach block, the test passes successfully.

About

Demo repo for jest issue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published