Open ajubin opened 1 year ago
Having the same issue. Jest explicitly calls out not recognizing satisfies
from typescript. Removing satisfies runs the test correctly.
} satisfies Color);
^^^^^^^^^
SyntaxError: Unexpected identifier
Hitting this same issue 😄 Need any help moving this along?
Having the same issue. Any updates on this? It mentions in the changelog that v29.1.0 supports Typescript 5.x
same issue with jest" 29.5.0, any updates?
Same here. Jest 29.5.0, typescript 4.9.5
Same here. Bummer that this has been an issue for 5 months.
Typescript: 5.0.4 ts-jest: 29.1.1 jest: 29.6.2
It's quite impressive how it can't go along with TypeScript changes.
Any ideas how to handle that?
My code is more safe with satisfies
than with unit tests, but still need to make coverage target :skull:
Same here it's been around one year now with no update from the team. satisfies
is widely used by now, and still no support from ts-jest
I don't know what the difficulties are in integrating the management of the satisfies operator into ts-jest
. But it's a bit complicated not to be able to use a widely used typescript operator because the tests don't support it…
Could we know why this is not integrated yet? What technical difficulties are you encountering?
I don't see the Reference Error
anymore. Does anyone have reproduce repo for this?
@ahnpnl ya, I have no idea what changed when but I am able to use satisfies now.
Version
29.1.0
Steps to reproduce
My repository is private, I tried to reproduce on an example repo but I couldn't.
My bug is the following, I have 3 files
With the following content
When I run
yarn jest
I've got the following errorReferenceError: model_1 is not defined
But the error disappear in one of the following cases:
satisfies ReturnType
inaFunction.ts
const experiences = names?.map(...)
and then returnsreturn {experiences} satisfies ReturnType
isolatedModules: true
in myjest.config.ts
Expected behavior
imports from 'model' are indeed imported
Actual behavior
ReferenceError
Debug log
ts-jest.log
Additional context
// Jest.config.ts
maybe useful packages version
Environment