Closed
Description
Description
jest testing framework has 9 functions that get module name as a parameter:
• jest.createMockFromModule
• jest.mock
• jest.unmock
• jest.deepUnmock
• jest.doMock
• jest.dontmock
• jest.setMock
• jest.requireActual
• jest.requireMock
The parameter contains a relative path to the source file to be mocked. The path is valid for files in src directory, but is not valid when the transpiled files are stored under target for testing.
The paths should be automatically transformed according to test location
Alternatives
As a workaround, the path can be set to the estimated location during testing, but it's not user friendly and prevents test to be run outside of vrbt context
Additional Context
This issue is only relevant for jest