You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It errors that jest is not defined so put it behind a function instead
of immediately creating the mock (this is probably a better pattern
anyway).
The constant tests had to be reworked a little because since the logger
mock is hoisted it runs before createLoggerMock is imported. I moved it
into a beforeAll which means the require call also needed to be moved
into there (since we need to mock the logger before requiring the
constants or it'll pull the non-mocked logger).
To avoid having to define a type for getPackageJson I just added a let
var set to the type of the imported constants file and modified the
other areas to use the same paradigm.
I also replaced some hardcoded strings with the mocked package.json
object.
0 commit comments