https://i.sstatic.net/kKqKy.png
package.json
{
"name": "application",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build ",
"lint": "vue-cli-service lint",
"dev": "vue-cli-service build --watch --mode=development",
"test": "jest tests/.*test.ts",
"watchTest": "jest --watch tests/.*test.ts"
},
"dependencies": {
"@quasar/extras": "^1.6.4",
"@types/node": "^14.0.3",
"axios": "^0.19.2",
"core-js": "^3.6.5",
"quasar": "^1.0.0",
"vue": "^2.6.11",
"vue-browser-acl": "^0.13.5",
"vue-class-component": "^7.2.3",
"vue-i18n": "^8.16.0",
"vue-infinite-loading": "^2.4.5",
"vue-moment": "^4.1.0",
"vue-property-decorator": "^8.4.2",
"vue2-dropzone": "^3.6.0",
"vuedraggable": "^2.23.2",
"vuex": "latest",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.16.1",
"vuex-persist": "^2.2.0"
},
"devDependencies": {
"@types/jest": "^25.2.1",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"@vue/cli": "^4.3.1",
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-eslint": "~4.3.0",
"@vue/cli-plugin-typescript": "^4.3.1",
"@vue/cli-service": "^4.3.1",
"@vue/eslint-config-typescript": "^5.0.2",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.0.1",
"babel-plugin-transform-imports": "1.5.0",
"clean-webpack-plugin": "^3.0.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"html-loader": "^1.1.0",
"jest": "^26.0.1",
"node-sass": "^4.13.0",
"sass-loader": "^8.0.0",
"typescript": "~3.8.3",
"vue-cli-plugin-quasar": "~2.0.0",
"vue-template-compiler": "^2.6.11",
"webpack-assets-manifest": "^3.1.1"
},
"jest": {
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
}
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"@vue/typescript"
],
"parserOptions": {
"parser": "@typescript-eslint/parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
babel.config.js
module.exports = {
"presets": [
"@vue/cli-plugin-babel/preset"
],
"plugins": [
[
"transform-imports",
{
"quasar": {
"transform": "quasar/dist/babel-transforms/imports.js",
"preventFullImport": true
}
}
],
]
}
tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env",
"jest",
"node",
"@types/jest"
],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}
I have encountered an error that I'm uncertain about. Could it be that Jest doesn't understand TypeScript or maybe it's related to Vue? When researching this issue online, most people seem to have problems with the "import" keywords rather than a variable. Adding babel-plugin-proposal-class-properties didn't help either. Since I don't fully comprehend the error and can't find similar issues online, it's challenging for me to resolve it. Any assistance would be greatly appreciated.