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
If you use mock-fs package the line numbers are shown icorrectly.
importDogfrom"./Dog";import*asmockfrom"mock-fs";describe("Dog",()=>{beforeAll(()=>{mock({"path/to/file.txt": "my text content",});});afterAll(()=>{mock.restore();})test("should woof",()=>{constdog=newDog();expect(dog.woof()).toBe("Woof!____ SHOULD FAIL AND DISPLAY LINE NUMBER 19");// but it shows error at line number 16});});
Expected behavior
When running the tests, the line number should be shown correctly. But instead the JS line number is shown (not the TS input file line number)
I have reported the bug on the ts-jest repo, but I also report it here because I don't know if it's a problem of ts-jest or mock-fs.
Link to ts-jest issue: kulshekhar/ts-jest#405
If you use mock-fs package the line numbers are shown icorrectly.
Expected behavior
When running the tests, the line number should be shown correctly. But instead the JS line number is shown (not the TS input file line number)
Link to a minimal repo that reproduces this issue
https://github.com/jhm-ciberman/ts-jest-bug
The text was updated successfully, but these errors were encountered: