Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit b6f9d11

Browse files
committed
fix(button): setup unit tests
1 parent f8a87ee commit b6f9d11

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Diff for: babel.config.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@ module.exports = {
22
presets: [
33
'@vue/app',
44
'@babel/preset-env'
5-
]
5+
],
6+
env: {
7+
development: {
8+
plugins: ['transform-es2015-modules-commonjs']
9+
},
10+
test: {
11+
plugins: ['transform-es2015-modules-commonjs']
12+
}
13+
}
614
}

Diff for: jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
'^.+\\.(js|jsx)?$': 'babel-jest'
1212
},
1313
transformIgnorePatterns: [
14-
'/node_modules/'
14+
'/node_modules/(?!lodash-es)'
1515
],
1616
moduleNameMapper: {
1717
'^@/(.*)$': '<rootDir>/src/$1'

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
},
3232
"devDependencies": {
3333
"@babel/core": "^7.6.0",
34+
"@babel/plugin-transform-modules-commonjs": "^7.6.0",
3435
"@commitlint/cli": "^8.2.0",
3536
"@commitlint/config-conventional": "^8.2.0",
3637
"@storybook/addon-actions": "^5.2.1",

Diff for: src/components/Button/button.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { shallowMount } from '@vue/test-utils'
2-
import Button from '../../lib/core/'
2+
import Button from '../Button'
33
import Theme from '../../../kiwi.config'
44

55
describe('===== Button Component =====', () => {

0 commit comments

Comments
 (0)