Jelajahi Sumber

Move jest config to a package.json key.

Renée Kooi 6 tahun lalu
induk
melakukan
28e8936fdc
2 mengubah file dengan 12 tambahan dan 3 penghapusan
  1. 12 2
      package.json
  2. 0 1
      packages/@uppy/companion/package.json

+ 12 - 2
package.json

@@ -99,11 +99,11 @@
     "test:prepare-ci": "npm-run-all --parallel --race test:registry test:build-ci",
     "test:acceptance": "npm run test:prepare-ci && wdio test/endtoend/wdio.remote.conf.js",
     "test:acceptance:local": "npm run test:build && wdio test/endtoend/wdio.local.conf.js",
-    "test:unit": "jest --testPathPattern=./src --coverage",
+    "test:unit": "jest",
     "test:companion": "cd ./packages/@uppy/companion && npm run test",
     "test:type": "tsc -p .",
     "test": "npm run lint && npm run test:unit && npm run test:type && npm run test:companion",
-    "test:watch": "jest --watch --testPathPattern=src",
+    "test:watch": "jest --watch",
     "travis:deletecache": "travis cache --delete",
     "watch:css": "onchange 'packages/**/*.scss' --initial --verbose -- npm run build:css",
     "watch:js": "onchange 'packages/{@uppy/,}*/src/**/*.js' --initial --verbose -- npm run build:bundle",
@@ -129,5 +129,15 @@
     "prepare": "lerna bootstrap --hoist",
     "contributors": "githubcontrib --owner transloadit --repo uppy --cols 6 $([ \"${GITHUB_TOKEN:-}\" == \"\" ] && echo \"\" || echo \"--authToken ${GITHUB_TOKEN}\") --showlogin true --sortOrder desc",
     "contributors:save": "replace-x -m '<!--contributors-->[\\s\\S]+<!--/contributors-->' \"<!--contributors-->\n## Contributors\n\n$(npm run --silent contributors)\n<!--/contributors-->\" README.md"
+  },
+  "jest": {
+    "automock": false,
+    "collectCoverage": true,
+    "collectCoverageFrom": [
+      "packages/**/src/**"
+    ],
+    "testMatch": [
+      "**/packages/**/*.test.js"
+    ]
   }
 }

+ 0 - 1
packages/@uppy/companion/package.json

@@ -45,7 +45,6 @@
     "@types/tus-js-client": "^1.4.1",
     "@types/uuid": "^3.4.3",
     "@types/ws": "^3.2.1",
-    "jest-cli": "^23.1.0",
     "nodemon": "^1.17.5",
     "supertest": "3.0.0"
   },