Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Плагин не работает с @swc/jest #8

Open
WoodenPC opened this issue Oct 27, 2022 · 0 comments
Open

Плагин не работает с @swc/jest #8

WoodenPC opened this issue Oct 27, 2022 · 0 comments

Comments

@WoodenPC
Copy link

Привет. Попробовал заюзать плагин для эффектора для тестов.

Версии библиотек:

"@swc/core": "1.2.249",
"@swc/jest": "0.2.23",
"@effector/swc-plugin": "0.0.7"
"react": "17.0.2",
"effector": "22.1.2",
"effector-react": "22.0.6",

jest.config.js

module.exports = {
    testEnvironment: 'jsdom',
    moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
    moduleDirectories: ['node_modules', 'src'],
    setupFilesAfterEnv: ['./jest.setup.js'],
    moduleNameMapper: {
        '\\.(css|less)$': 'identity-obj-proxy',
    },
    setupFiles: ['jest-canvas-mock'],
    transform: {
        '^.+\\.(t|j)sx?$': ['@swc/jest', {
            "jsc": {
                "experimental": {
                    "plugins": [
                        ["@effector/swc-plugin",
                        {
                            "factories": []
                        }]
                    ]
                }
            }
        }],
    },
};

В консоли получаю различные ошибки, причем они могут отличаться в зависимости от версии swc/core .
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants