瀏覽代碼

test: spec paths defined in mocharc

Jonas Gloning 2 年之前
父節點
當前提交
daa74115c8
共有 2 個文件被更改,包括 5 次插入4 次删除
  1. 2 1
      .mocharc.jsonc
  2. 3 3
      package.json

+ 2 - 1
.mocharc.jsonc

@@ -1,5 +1,6 @@
 {
 {
 	"$schema": "https://json.schemastore.org/mocharc",
 	"$schema": "https://json.schemastore.org/mocharc",
 	"require": "source-map-support/register",
 	"require": "source-map-support/register",
-	"require": "ts-node/register"
+	"require": "ts-node/register",
+	"spec": "test/**/*.ts"
 }
 }

+ 3 - 3
package.json

@@ -51,9 +51,9 @@
     "build": "parcel build",
     "build": "parcel build",
     "lint": "eslint --ext .js,.ts . && npm run check",
     "lint": "eslint --ext .js,.ts . && npm run check",
     "check": "tsc --noEmit",
     "check": "tsc --noEmit",
-    "test": "npm run lint && mocha \"test/**/*\"",
-    "coverage": "nyc mocha \"test/**/*\"",
-    "coverage:lcov": "nyc --reporter=lcov mocha \"test/**/*\"",
+    "test": "npm run lint && mocha",
+    "coverage": "nyc mocha",
+    "coverage:lcov": "nyc --reporter=lcov mocha",
     "start": "dist/bin/peerjs.js --port ${PORT:=9000}",
     "start": "dist/bin/peerjs.js --port ${PORT:=9000}",
     "dev": "nodemon --watch src -e ts --exec npm run start",
     "dev": "nodemon --watch src -e ts --exec npm run start",
     "semantic-release": "semantic-release"
     "semantic-release": "semantic-release"