Jelajahi Sumber

PROD-2707: Code review feedback

 * Separate unit and integration test running in `package.json`
Blake Schneider 5 tahun lalu
induk
melakukan
a0c17a8a16
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      package.json

+ 3 - 2
package.json

@@ -5,8 +5,9 @@
   "main": "index.js",
   "scripts": {
     "start": "node index.js",
-    "test": "npm run unit",
-    "unit": "NODE_ENV=test _mocha --exit $(find __tests__ -name \"*.spec.js\")",
+    "test": "npm run unit && npm run integration",
+    "unit": "NODE_ENV=test CLIENT_ID=woohoo CLIENT_SECRET=i_am_secret mocha ./__tests__/unit/*/*.spec.js ./__tests__/unit/*/*/*.spec.js",
+    "integration": "NODE_ENV=test ./lib/__tests__/integration/*/*.spec.js",
     "lint": "eslint $(find __tests__ client config modules processes server xml -name \"*.js\")",
     "fixlint": "eslint --fix $(find __tests__ client config modules processes server xml -name \"*.js\")",
     "fixprettier": "prettier --write $(find __tests__ client config modules processes server xml -name \"*.js\")"