From 949151dc4a555fef9a039a3a10f334c36e1fa942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sun, 25 Nov 2018 21:45:35 +0800 Subject: [PATCH] add verification devDependencies --- .eslintignore | 2 ++ .eslintrc.js | 5 ++++- jest-puppeteer.config.js | 1 + package.json | 16 ++++++++-------- src/e2e/userLayout.e2e.js | 5 ----- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.eslintignore b/.eslintignore index 87467c1f..516f1655 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,3 @@ /functions/mock +/tests/* +./* \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 61b7c58f..56cd3d82 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,7 +20,10 @@ module.exports = { 'react/forbid-prop-types': 0, 'react/jsx-one-expression-per-line': 0, 'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }], - 'import/no-extraneous-dependencies': [2, { optionalDependencies: true }], + 'import/no-extraneous-dependencies': [ + 2, + { optionalDependencies: true, devDependencies: false }, + ], 'jsx-a11y/no-noninteractive-element-interactions': 0, 'jsx-a11y/click-events-have-key-events': 0, 'jsx-a11y/no-static-element-interactions': 0, diff --git a/jest-puppeteer.config.js b/jest-puppeteer.config.js index 9edd60e1..53fa1df1 100644 --- a/jest-puppeteer.config.js +++ b/jest-puppeteer.config.js @@ -1,6 +1,7 @@ // ps https://github.com/GoogleChrome/puppeteer/issues/3120 module.exports = { launch: { + headless: false, args: [ '--disable-gpu', '--disable-dev-shm-usage', diff --git a/package.json b/package.json index 74d3653a..f2a3f094 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ }, "dependencies": { "@babel/runtime": "^7.1.5", - "antd": "^3.10.8", - "bizcharts": "^3.3.0", + "antd": "^3.10.9", + "bizcharts": "^3.4.0", "bizcharts-plugin-slider": "^2.1.1-beta.1", "classnames": "^2.2.6", "dva": "^2.4.0", @@ -47,7 +47,7 @@ "omit.js": "^1.0.0", "path-to-regexp": "^2.4.0", "prop-types": "^15.5.10", - "qs": "^6.5.2", + "qs": "^6.6.0", "rc-animate": "^2.4.4", "react": "^16.5.1", "react-container-query": "^0.11.0", @@ -60,8 +60,8 @@ }, "devDependencies": { "@antv/data-set": "^0.10.0", - "@types/react": "^16.7.6", - "@types/react-dom": "^16.0.9", + "@types/react": "^16.7.7", + "@types/react-dom": "^16.0.10", "antd-pro-merge-less": "^0.2.0", "antd-theme-webpack-plugin": "^1.1.8", "babel-eslint": "^10.0.1", @@ -78,14 +78,14 @@ "eslint-plugin-markdown": "^1.0.0-beta.6", "eslint-plugin-react": "^7.11.1", "gh-pages": "^2.0.1", - "husky": "^1.1.2", + "husky": "^1.2.0", "jest-puppeteer": "^3.5.1", - "lint-staged": "^8.0.4", + "lint-staged": "^8.1.0", "merge-umi-mock-data": "^0.0.3", "mockjs": "^1.0.1-beta3", "prettier": "1.15.2", "pro-download": "^1.0.1", - "stylelint": "^9.4.0", + "stylelint": "^9.8.0", "stylelint-config-prettier": "^4.0.0", "stylelint-config-standard": "^18.0.0", "tslint": "^5.10.0", diff --git a/src/e2e/userLayout.e2e.js b/src/e2e/userLayout.e2e.js index e9179a2a..a3f23a68 100644 --- a/src/e2e/userLayout.e2e.js +++ b/src/e2e/userLayout.e2e.js @@ -12,9 +12,6 @@ function formatter(data) { } describe('Homepage', () => { - let browser; - let page; - const testPage = path => async () => { await page.goto(`${BASE_URL}${path}`); await page.waitForSelector('footer', { @@ -32,6 +29,4 @@ describe('Homepage', () => { formatter(RouterConfig[0].routes).forEach(route => { fit(`test pages ${route}`, testPage(route)); }); - - afterAll(() => browser.close()); }); -- GitLab