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
First of all, thank you for this package, it saves me alot!
I spotted a bug (or did I miss anything?):
If __TC_CONFIG__ doesn't appear in package.json, the line number mapping won't pass to stack trace messages.
To reproduce this, delete the __TC_CONFIG__ section in tests/simple/package.json and under dir tests/simple run jest:
FAIL __tests__/Hello.test.ts
● Hello Class › should throw an error on line 11
Hello error!
at new Hello (Hello.ts:5:15)
at Object.<anonymous> (__tests__/Hello.test.ts:5:21)
Hello Class
✕ should throw an error on line 11 (7ms)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.918s, estimated 1s
Ran all test suites.
Note that the line at new Hello (Hello.ts:5:15) was at new Hello (Hello.ts:11:15) before changing package.json
However if I add the __TS_CONFIG__:{} back into config, everything is working normal:
FAIL __tests__/Hello.test.ts
● Hello Class › should throw an error on line 11
Hello error!
at new Hello (Hello.ts:11:11)
at Object.<anonymous> (Hello.test.ts:9:19)
Hello Class
✕ should throw an error on line 11 (113ms)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.973s, estimated 1s
Ran all test suites.
If I understand correctly, __TC_CONFIG__ is mean to override tsconfig settings, so we should expect ts-jest works out-of-box without providing a __TC_CONFIG__?
The text was updated successfully, but these errors were encountered:
gizak
changed the title
__TC_CONFIG__ in package.json jest.globals
__TC_CONFIG__ in package.json jest.globals
Oct 13, 2016
node: v6.8.0
jest: v16.0.1
ts-jest: 0.1.7
First of all, thank you for this package, it saves me alot!
I spotted a bug (or did I miss anything?):
If
__TC_CONFIG__
doesn't appear in package.json, the line number mapping won't pass to stack trace messages.To reproduce this, delete the
__TC_CONFIG__
section intests/simple/package.json
and under dirtests/simple
runjest
:Note that the line
at new Hello (Hello.ts:5:15)
wasat new Hello (Hello.ts:11:15)
before changing package.jsonHowever if I add the
__TS_CONFIG__:{}
back into config, everything is working normal:If I understand correctly,
__TC_CONFIG__
is mean to override tsconfig settings, so we should expectts-jest
works out-of-box without providing a__TC_CONFIG__
?The text was updated successfully, but these errors were encountered: