Skip to content

Commit

Permalink
* updated babel-core
Browse files Browse the repository at this point in the history
* installed @babel/runtime for regenerator-runtime
* added dummy test
* configured jest (transforms, ignore patterns, module mapper @/, jest-transform-stub)
  • Loading branch information
iliadmitriev committed Jun 30, 2021
1 parent 015f69b commit aaf643b
Show file tree
Hide file tree
Showing 5 changed files with 24,132 additions and 12,303 deletions.
14 changes: 12 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'

presets: ["@babel/preset-env"],

env: {
test: {
plugins: ["@babel/plugin-transform-runtime"]
}
},

plugins: [
["@babel/transform-runtime"]
]

}
42 changes: 42 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module.exports = {

verbose: true,

testEnvironment: 'jsdom',

moduleFileExtensions: [
'js',
'json',
'vue'
],

moduleNameMapper: {
"^.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub",
// enable import beginning with @/ - as reference to <root>/src/ folder
"^@/(.*)$": "<rootDir>/src/$1"
},

modulePathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/dist/',
'<rootDir>/coverage/'
],

transform: {
'.*\\.(vue)$': 'vue-jest',
'.*\\.(js)$': 'babel-jest'
},

collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,vue}', '!**/node_modules/**'],
coveragePathIgnorePatterns: [],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100
}
},

}
Loading

0 comments on commit aaf643b

Please sign in to comment.