cma-template
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "cma-template", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "matman project template use Mocha", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "4885720bc84c4c49f1823158bedddc088c4049c8" | ||
"gitHead": "c9187ced5fbe804e3ba7091a027fd745b0632045" | ||
} |
{ | ||
"package": { | ||
"name": "create-matman-app-mocha", | ||
"private": true, | ||
@@ -20,14 +21,14 @@ "scripts": { | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"cross-env": "^7.0.2", | ||
"html-webpack-plugin": "^4.3.0", | ||
"html-webpack-plugin": "^4.5.0", | ||
"istanbul-instrumenter-loader": "^3.0.1", | ||
"matman-e2e-test": "^1.1.0", | ||
"matman-e2e-test": "^1.2.1", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12", | ||
"chai": "^4.2.0", | ||
"mocha": "^8.1.3", | ||
"mochawesome": "^6.1.1", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12" | ||
"mochawesome": "^6.1.1" | ||
} | ||
} | ||
} |
@@ -13,4 +13,4 @@ { | ||
"devDependencies": { | ||
"mockstar-cli": "^1.3.17" | ||
"mockstar-cli": "^1.3.21" | ||
} | ||
} |
@@ -1,7 +0,10 @@ | ||
# create-matman-app 的 mocha 模板 | ||
# 使用 matman 做端对端测试(E2E/UI Testing) | ||
本项目是由 [create-matman-app](https://www.npmjs.com/package/create-matman-app) 的默认模板初始化生成,相应的初始化命令如下: | ||
本项目由 [create-matman-app](https://www.npmjs.com/package/create-matman-app) 初始化生成,相应的初始化命令如下: | ||
``` | ||
$ npx create-matman-app matman-app | ||
$ npx create-matman-app my-app | ||
# 或者 | ||
$ npx create-matman-app my-app --template=mocha | ||
``` | ||
@@ -15,9 +18,9 @@ | ||
- 测试框架:[Mocha](https://mochajs.org/) | ||
- 断言库:[Chai](https://www.chaijs.com/) | ||
- 代理工具:[Whistle](https://github.com/avwo/whistle) | ||
- mock 工具:[MockStar](https://github.com/mockstarjs/mockstar) | ||
- web 端对端测试框架:[Matman](https://github.com/matmanjs/matman) | ||
- 测试框架:[Mocha](https://mochajs.org/) | ||
- 断言库:[Chai](https://www.chaijs.com/) | ||
## 2. 命令 | ||
@@ -39,3 +42,3 @@ | ||
- 第四步:启动 matman,提供了无头浏览器,用于 web 端对端测试时被测试文件调用 | ||
- 第五步:使用 mocha 执行测试文件 | ||
- 第五步:执行测试文件 | ||
@@ -87,4 +90,5 @@ ```bash | ||
完成 "2.2.1 准备测试环境" 之后,就可以直接运行测试(更适合调试阶段运行): | ||
```bash | ||
# 使用 mocha 执行测试文件 | ||
$ npm run test:e2e:direct | ||
@@ -91,0 +95,0 @@ ``` |
69366
1138