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
Get the following output:
SyntaxError: /path/to/controllers/Controller.ts: Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'. (7:49)
If I remove the ts-jest config that points to babelConfig then it falls over saying to add the babel decorators plugin, so I know it's picking up my working babel config. However it seems to using an old/different way of compiling the decorators in the build. Does it support that stage of the decorators proposal? 202305?
Thanks
Expected behavior
Expect compiled output to be aligned with the specified version of decorators so that jest can read the file correctly
Actual behavior
SyntaxError: /path/to/controllers/Controller.ts: Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'. (7:49)
Version
29.1.2
Steps to reproduce
Building an Express app using razzlejs that uses babel & the required babel plugins to support decorators in TS5 (not experimental)
Application builds, runs great, just can't use jest to test with following output:
I have the following dependencies:
ts-jest: 29.1.2
babel-jest: 29.7.0
typescript: 5.3.2
jest config for ts-jest:
transform = {
"ts-jest",
{
tsConfig: "tsconfig.json",
babelConfig: "babel.config.js",
},
}
babel config:
Get the following output:
SyntaxError: /path/to/controllers/Controller.ts: Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'. (7:49)
If I remove the ts-jest config that points to babelConfig then it falls over saying to add the babel decorators plugin, so I know it's picking up my working babel config. However it seems to using an old/different way of compiling the decorators in the build. Does it support that stage of the decorators proposal? 202305?
Thanks
Expected behavior
Expect compiled output to be aligned with the specified version of decorators so that jest can read the file correctly
Actual behavior
SyntaxError: /path/to/controllers/Controller.ts: Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'. (7:49)
Debug log
Will attach after created
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: