测试react-router v4以及redux并实现store持久化

package.json 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {
  2. "name": "react-router-v4",
  3. "version": "0.1.0",
  4. "private": true,
  5. "dependencies": {
  6. "@types/prop-types": "^15.5.3",
  7. "@types/react-loadable": "^5.4.0",
  8. "@types/react-redux": "^6.0.3",
  9. "@types/react-router-dom": "^4.2.7",
  10. "@types/redux": "^3.6.0",
  11. "@types/redux-logger": "^3.0.7",
  12. "@types/redux-thunk": "^2.1.0",
  13. "autoprefixer": "7.1.6",
  14. "babel-jest": "^22.1.0",
  15. "babel-loader": "^7.1.2",
  16. "babel-preset-react-app": "^3.1.1",
  17. "case-sensitive-paths-webpack-plugin": "2.1.1",
  18. "chalk": "1.1.3",
  19. "css-loader": "0.28.7",
  20. "dotenv": "4.0.0",
  21. "dotenv-expand": "4.2.0",
  22. "extract-text-webpack-plugin": "3.0.2",
  23. "file-loader": "0.11.2",
  24. "fork-ts-checker-webpack-plugin": "^0.2.8",
  25. "fs-extra": "3.0.1",
  26. "happypack": "^5.0.0",
  27. "html-webpack-plugin": "2.29.0",
  28. "jest": "22.4.2",
  29. "less": "^3.0.4",
  30. "less-loader": "^4.1.0",
  31. "object-assign": "4.1.1",
  32. "postcss-flexbugs-fixes": "3.2.0",
  33. "postcss-loader": "2.0.8",
  34. "promise": "8.0.1",
  35. "prop-types": "^15.6.2",
  36. "raf": "3.4.0",
  37. "react": "^16.4.1",
  38. "react-dev-utils": "^5.0.1",
  39. "react-dom": "^16.4.1",
  40. "react-loadable": "^5.4.0",
  41. "react-redux": "^5.0.7",
  42. "react-router": "^4.3.1",
  43. "react-router-dom": "^4.3.1",
  44. "redux": "^4.0.0",
  45. "redux-logger": "^3.0.6",
  46. "redux-persist": "^5.10.0",
  47. "redux-thunk": "^2.3.0",
  48. "resolve": "1.6.0",
  49. "source-map-loader": "^0.2.1",
  50. "style-loader": "0.19.0",
  51. "sw-precache-webpack-plugin": "0.11.4",
  52. "ts-jest": "22.0.1",
  53. "ts-loader": "^2.3.7",
  54. "tsconfig-paths-webpack-plugin": "^2.0.0",
  55. "tslint": "^5.7.0",
  56. "tslint-config-prettier": "^1.10.0",
  57. "tslint-react": "^3.2.0",
  58. "uglifyjs-webpack-plugin": "^1.1.8",
  59. "url-loader": "0.6.2",
  60. "webpack": "3.8.1",
  61. "webpack-dev-server": "2.9.4",
  62. "webpack-manifest-plugin": "1.3.2",
  63. "whatwg-fetch": "2.0.3"
  64. },
  65. "scripts": {
  66. "start": "node scripts/start.js",
  67. "build": "node scripts/build.js",
  68. "test": "node scripts/test.js --env=jsdom"
  69. },
  70. "devDependencies": {
  71. "@types/jest": "^23.1.3",
  72. "@types/node": "^10.5.0",
  73. "@types/react": "^16.4.4",
  74. "@types/react-dom": "^16.0.6",
  75. "typescript": "^2.9.2"
  76. },
  77. "jest": {
  78. "collectCoverageFrom": [
  79. "src/**/*.{js,jsx,ts,tsx}"
  80. ],
  81. "setupFiles": [
  82. "<rootDir>/config/polyfills.js"
  83. ],
  84. "testMatch": [
  85. "<rootDir>/src/**/__tests__/**/*.(j|t)s?(x)",
  86. "<rootDir>/src/**/?(*.)(spec|test).(j|t)s?(x)"
  87. ],
  88. "testEnvironment": "node",
  89. "testURL": "http://localhost",
  90. "transform": {
  91. "^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
  92. "^.+\\.tsx?$": "<rootDir>/config/jest/typescriptTransform.js",
  93. "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
  94. "^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
  95. },
  96. "transformIgnorePatterns": [
  97. "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|ts|tsx)$"
  98. ],
  99. "moduleNameMapper": {
  100. "^react-native$": "react-native-web"
  101. },
  102. "moduleFileExtensions": [
  103. "web.ts",
  104. "ts",
  105. "web.tsx",
  106. "tsx",
  107. "web.js",
  108. "js",
  109. "web.jsx",
  110. "jsx",
  111. "json",
  112. "node",
  113. "mjs"
  114. ],
  115. "globals": {
  116. "ts-jest": {
  117. "tsConfigFile": "C:\\Users\\MAGIC\\Desktop\\TestProjet\\react-router-v4\\tsconfig.test.json"
  118. }
  119. }
  120. },
  121. "babel": {
  122. "presets": [
  123. "react-app"
  124. ]
  125. },
  126. "eslintConfig": {
  127. "extends": "react-app"
  128. }
  129. }