mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
add jest
This commit is contained in:
parent
84487ef108
commit
42a23f98d1
@ -6,7 +6,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true
|
node: true,
|
||||||
|
'jest/globals': true
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
'standard',
|
'standard',
|
||||||
@ -14,9 +15,9 @@ module.exports = {
|
|||||||
'plugin:import/errors',
|
'plugin:import/errors',
|
||||||
'plugin:import/warnings'
|
'plugin:import/warnings'
|
||||||
],
|
],
|
||||||
// required to lint *.vue files
|
|
||||||
plugins: [
|
plugins: [
|
||||||
'html'
|
'html',
|
||||||
|
'jest'
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
'import/resolver': {
|
'import/resolver': {
|
||||||
|
15
package.json
15
package.json
@ -40,13 +40,13 @@
|
|||||||
"bin": {
|
"bin": {
|
||||||
"nuxt": "./bin/nuxt"
|
"nuxt": "./bin/nuxt"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"jest": {
|
||||||
"include": [
|
"testEnvironment": "node",
|
||||||
"lib"
|
"coverageDirectory": "./coverage/",
|
||||||
]
|
"collectCoverage": false
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && nyc ava --fail-fast -v -T 60000 test/ -- && nyc report --reporter=html",
|
"test": "npm run lint && jest",
|
||||||
"test-appveyor": "yarn test",
|
"test-appveyor": "yarn test",
|
||||||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
||||||
"lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/",
|
"lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/",
|
||||||
@ -120,23 +120,22 @@
|
|||||||
"webpack-stylish": "^0.1.6"
|
"webpack-stylish": "^0.1.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^0.25.0",
|
|
||||||
"babel-eslint": "^8.2.1",
|
"babel-eslint": "^8.2.1",
|
||||||
"babel-plugin-istanbul": "^4.1.5",
|
|
||||||
"codecov": "^3.0.0",
|
"codecov": "^3.0.0",
|
||||||
"eslint": "^4.18.2",
|
"eslint": "^4.18.2",
|
||||||
"eslint-config-standard": "^11.0.0",
|
"eslint-config-standard": "^11.0.0",
|
||||||
"eslint-config-standard-jsx": "^5.0.0",
|
"eslint-config-standard-jsx": "^5.0.0",
|
||||||
"eslint-plugin-html": "^4.0.2",
|
"eslint-plugin-html": "^4.0.2",
|
||||||
"eslint-plugin-import": "^2.8.0",
|
"eslint-plugin-import": "^2.8.0",
|
||||||
|
"eslint-plugin-jest": "^21.15.0",
|
||||||
"eslint-plugin-node": "^6.0.0",
|
"eslint-plugin-node": "^6.0.0",
|
||||||
"eslint-plugin-promise": "^3.7.0",
|
"eslint-plugin-promise": "^3.7.0",
|
||||||
"eslint-plugin-react": "^7.6.1",
|
"eslint-plugin-react": "^7.6.1",
|
||||||
"eslint-plugin-standard": "^3.0.1",
|
"eslint-plugin-standard": "^3.0.1",
|
||||||
"express": "^4.16.2",
|
"express": "^4.16.2",
|
||||||
"finalhandler": "^1.1.1",
|
"finalhandler": "^1.1.1",
|
||||||
|
"jest": "^22.4.2",
|
||||||
"jsdom": "^11.6.2",
|
"jsdom": "^11.6.2",
|
||||||
"nyc": "^11.6.0",
|
|
||||||
"puppeteer": "^1.0.0",
|
"puppeteer": "^1.0.0",
|
||||||
"request": "^2.83.0",
|
"request": "^2.83.0",
|
||||||
"request-promise-native": "^1.0.5",
|
"request-promise-native": "^1.0.5",
|
||||||
|
9
test/.babelrc
Normal file
9
test/.babelrc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"test": {
|
||||||
|
"presets": [
|
||||||
|
"env"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user