diff --git a/.eslintignore b/.eslintignore index 87467c1fdf12a0ebeb9b731996a8de7718167831..516f165584801e4d712e646f5eb546ff40f1cd08 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 61b7c58f144009465484e71d59a45d112637afc2..56cd3d82a155627fd33b538e89906e2f7a4701b1 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 9edd60e1dfd703234494ac93fcc9788eef364949..53fa1df198f3d0b7abcfc8a8fc77cc9b02f3474a 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 74d3653a1a7bb5e01d1a1584e6fff52b082a4a2b..f2a3f09453597d2c58e68aef02727f5e0ce82289 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 e9179a2adbe5b75b86bad6bf6223d3a7e8a5e036..a3f23a685814a9a8b5ebe34c5ca9e9c1ede0c97a 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()); });