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
But when using ts-jest, these .ts reporters are not compiled automatically, so error is happens. It seems like jest does not pass reporters code to transformer
import type { Reporter, Test, AggregatedResult, TestResult, ReporterOnStartOptions, Context } from '@jest/reporters'
^^^^^^
SyntaxError: Cannot use import statement outside a module
use sample reporter code and config example above, and just run tests as usual
Expected behavior
Expected ts compilation to be applied for custom jest typescript reporters as well
Debug log:
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"26.1.1"},"message":"creating jest presets not handling JavaScript files","sequence":1,"time":"2020-07-17T08:50:43.404Z"}
## envinfo
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report (repost of - kulshekhar/ts-jest#1811)
This is probably more like a feature request. Jest allows to load own custom reporters with syntax:
But when using ts-jest, these .ts reporters are not compiled automatically, so error is happens. It seems like jest does not pass reporters code to transformer
Sample reporter code:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected ts compilation to be applied for custom jest typescript reporters as well
Debug log:
System:
OS: MacOS
Npm packages:
jest: "jest": "^26.1.0",
ts-jest: "ts-jest": "^26.1.1",
typescript: "typescript": "^3.9.5",
The text was updated successfully, but these errors were encountered: