diff --git a/package.json b/package.json index 5bea10031285bad9ec49f657145a077ede90cb9d..8c6e26ab6f8983a2a7e4e9a8d2abb042a2b01c41 100755 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "lint:fix": "eslint --fix --ext .js src mock tests && npm run lint:style", "lint-staged": "lint-staged", "lint-staged:js": "eslint --ext .js", - "test": "jest", - "test:comps": "jest ./src/components", + "test": "roadhog test", + "test:component": "roadhog test ./src/components", "test:all": "node ./tests/run-tests.js" }, "dependencies": { @@ -46,20 +46,13 @@ "react-fittext": "^1.0.0" }, "devDependencies": { - "@babel/core": "^7.0.0-beta.37", - "@babel/preset-env": "^7.0.0-beta.36", - "@babel/preset-react": "^7.0.0-beta.36", - "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^8.1.2", - "babel-jest": "^22.0.4", "babel-plugin-dva-hmr": "^0.4.1", "babel-plugin-import": "^1.6.3", - "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "cross-env": "^5.1.1", "cross-port-killer": "^1.0.1", "enzyme": "^3.1.0", - "enzyme-adapter-react-16": "^1.0.2", "eslint": "^4.14.0", "eslint-config-airbnb": "^16.0.0", "eslint-plugin-babel": "^4.0.0", @@ -70,15 +63,12 @@ "eslint-plugin-react": "^7.0.1", "gh-pages": "^1.0.0", "husky": "^0.14.3", - "jest": "^22.0.4", - "jsdom": "^11.5.1", "lint-staged": "^6.0.0", "mockjs": "^1.0.1-beta3", "pro-download": "^1.0.1", - "react-test-renderer": "^16.2.0", "redbox-react": "^1.5.0", "regenerator-runtime": "^0.11.1", - "roadhog": "^2.0.6", + "roadhog": "^2.1.0", "roadhog-api-doc": "^0.3.4", "rollbar": "^2.3.4", "stylelint": "^8.4.0", @@ -87,32 +77,6 @@ "optionalDependencies": { "nightmare": "^2.10.0" }, - "babel": { - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ], - "plugins": [ - "transform-decorators-legacy", - "transform-class-properties" - ] - }, - "jest": { - "setupFiles": [ - "/tests/setupTests.js" - ], - "testMatch": [ - "**/?(*.)(spec|test|e2e).js?(x)" - ], - "setupTestFrameworkScriptFile": "/tests/jasmine.js", - "moduleFileExtensions": [ - "js", - "jsx" - ], - "moduleNameMapper": { - "\\.(css|less)$": "/tests/styleMock.js" - } - }, "lint-staged": { "**/*.{js,jsx}": "lint-staged:js", "**/*.less": "stylelint --syntax less" diff --git a/tests/jasmine.js b/tests/jasmine.js deleted file mode 100644 index 5ff26bff5210628b9fdff3152e29afd646a8e164..0000000000000000000000000000000000000000 --- a/tests/jasmine.js +++ /dev/null @@ -1 +0,0 @@ -jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000; diff --git a/tests/setupTests.js b/tests/setupTests.js deleted file mode 100644 index 0fb8aa7ff607587a264e158e6bd6d33ed6e1a688..0000000000000000000000000000000000000000 --- a/tests/setupTests.js +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable import/first */ -global.requestAnimationFrame = - global.requestAnimationFrame || function requestAnimationFrame(callback) { - setTimeout(callback, 0); - }; -import { JSDOM } from 'jsdom'; -import Enzyme from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; - -Enzyme.configure({ adapter: new Adapter() }); - -// fixed jsdom miss -const documentHTML = '
'; -global.document = new JSDOM(documentHTML); -global.window = document.defaultView; -global.navigator = global.window.navigator; diff --git a/tests/styleMock.js b/tests/styleMock.js deleted file mode 100644 index f053ebf7976e3726d11f3c03fade2170903889a5..0000000000000000000000000000000000000000 --- a/tests/styleMock.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {};