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

Commit 5349692

Browse files
committed
Merge branch 'feature/test-next' of https://github.com/chakra-ui/chakra-ui-vue into mchore/merge-tests
2 parents 4f3356c + efd6965 commit 5349692

File tree

39 files changed

+719
-600
lines changed

39 files changed

+719
-600
lines changed

.eslintrc.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ module.exports = {
33
env: {
44
node: true
55
},
6-
'extends': [
6+
plugins: ['testing-library'],
7+
extends: [
78
'plugin:vue/essential',
89
'@vue/standard',
9-
'@nuxtjs'
10+
'@nuxtjs',
11+
'plugin:testing-library/recommended',
12+
'plugin:testing-library/vue'
1013
],
1114
rules: {
1215
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1316
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
14-
'curly': 'off'
17+
curly: 'off',
18+
'testing-library/no-debug': 'error',
19+
'testing-library/prefer-screen-queries': 'error',
20+
'testing-library/await-fire-event': 'error'
1521
},
1622
parserOptions: {
1723
parser: 'babel-eslint'
@@ -23,10 +29,7 @@ module.exports = {
2329
},
2430
overrides: [
2531
{
26-
files: [
27-
'**/__tests__/*.{j,t}s?(x)',
28-
'**/tests/*.{j,t}s?(x)'
29-
],
32+
files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/*.{j,t}s?(x)'],
3033
env: {
3134
jest: true
3235
}

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
],
77
env: {
88
test: {
9-
plugins: ['transform-es2015-modules-commonjs']
9+
// plugins: ['transform-es2015-modules-commonjs']
1010
}
1111
}
1212
}

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ module.exports = {
2929
watchPlugins: [
3030
'jest-watch-typeahead/filename',
3131
'jest-watch-typeahead/testname'
32-
]
32+
],
33+
testEnvironmentOptions: { resources: 'usable' }
3334
}

jsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"~/*": ["./*"],
6+
"@/*": ["./*"],
7+
"~~/*": ["./*"],
8+
"@@/*": ["./*"]
9+
}
10+
},
11+
"exclude": ["node_modules", ".nuxt", "dist"]
12+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
"eslint-loader": "^3.0.3",
149149
"eslint-plugin-nuxt": ">=0.4.2",
150150
"eslint-plugin-prettier": "^3.1.2",
151+
"eslint-plugin-testing-library": "^3.3.1",
151152
"jest": "^25.1.0",
152153
"prettier": "^1.19.1",
153154
"rimraf": "^3.0.2",

0 commit comments

Comments
 (0)