R
R
Roman Romanovich2021-04-29 16:34:34
webpack
Roman Romanovich, 2021-04-29 16:34:34

jest test syntax error?

Good afternoon!
When running tests, an error occurs everywhere

({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import { shallowMount, mount, createLocalVue } from '@vue/test-utils';
SyntaxError: Unexpected token {


configuration files:
package.json

"jest": {
        "verbose": true,
        "rootDir": "ui/",
        "transform": {
            "\\.js$": "babel-jest",
            "^.+\\.vue$": "vue-jest"
        },
        "moduleFileExtensions": [
            "js",
            "json",
            "vue"
        ],
        "transformIgnorePatterns": [
            "/node_modules/"
        ],
        "moduleNameMapper": {
            "common/vue/mixins/": "<rootDir>/__mocks__/jsFileMock.js",
            "common/vue/components/ns-servers": "<rootDir>/__mocks__/jsFileMock.js"
        }
    },

.babelrc
{
    "presets": ,
    "env": {
        "test": {
            "presets": 
        }
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question