swc-node icon indicating copy to clipboard operation
swc-node copied to clipboard

@swc-node/jest TypeError: Cannot read properties of undefined

Open OtavioCapila opened this issue 2 years ago • 0 comments

I'm trying to migrate from ts-jest to @swc-node/jest, but I keep getting this error from the file where I export all of my Database models. image

Here is my index.ts where I do all these exports image

This is my transform from jest.config.js

transform: {
    '^.+\\.(t|j)s?$': [
      '@swc-node/jest',
      {
        keepClassNames: true,
        esModuleInterop: true,
        dynamicImport: true,
        experimentalDecorators: true,
        emitDecoratorMetadata: true,
      },
    ],
  },

I've tried all combinations for this configuration above, without success.

Am i missing something?

OtavioCapila avatar May 25 '22 20:05 OtavioCapila