Skip to content

Commit c2ae966

Browse files
committed
fix(test): 处理测试功能的一些错误
- MOCKM_REGISTRY 环境变量用于保证稳定的自动安装依赖 - --require 用于处理并行测试时不能正确显示 html - adamgruber/mochawesome#331
1 parent 69dfe2d commit c2ae966

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test:dev": "cross-env testEnv=dev mocha --parallel ./*.test.js --retries 3 --exit --require ./fixtures.js -R mochawesome --timeout 0 --reporter-options reportDir=./res,reportFilename=index",
8-
"test:build": "cross-env testEnv=build mocha --parallel ./*.test.js --retries 3 --exit --require ./fixtures.js -R mochawesome --timeout 0 --reporter-options reportDir=./res,reportFilename=index"
7+
"test:dev": "cross-env MOCKM_REGISTRY=https://registry.npm.taobao.org/ testEnv=dev mocha --require mochawesome/src/register ./*.test.js --retries 3 --exit --require ./fixtures.js -R mochawesome --timeout 0 --reporter-options reportDir=./res,reportFilename=index",
8+
"test:build": "cross-env MOCKM_REGISTRY=https://registry.npm.taobao.org/ testEnv=build mocha --require mochawesome/src/register ./*.test.js --retries 3 --exit --require ./fixtures.js -R mochawesome --timeout 0 --reporter-options reportDir=./res,reportFilename=index"
99
},
1010
"keywords": [],
1111
"author": "",
@@ -14,8 +14,8 @@
1414
"axios": "^0.21.1",
1515
"cross-env": "^7.0.3",
1616
"get-port": "^5.1.1",
17-
"mocha": "^9.0.2",
18-
"mochawesome": "^6.2.2",
17+
"mocha": "^9.1.3",
18+
"mochawesome": "^7.1.3",
1919
"shelljs": "^0.8.4",
2020
"ws": "^7.5.3"
2121
}

0 commit comments

Comments
 (0)