Skip to content

Commit

Permalink
chore: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Jun 7, 2021
1 parent 9192245 commit d52248d
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ Apitest 使用JSONA格式描述测试用例。 JSON描述数据,注解描述

### @module

功能: 引入子模块
使用范围: 入口文件
- 功能: 引入子模块
- 使用范围: 入口文件

```
// main.jsona
Expand All @@ -327,8 +327,8 @@ Apitest 使用JSONA格式描述测试用例。 JSON描述数据,注解描述

### @jslib

功能:引入用户脚本
使用范围: 入口文件
- 功能:引入用户脚本
- 使用范围: 入口文件

编写函数`lib.js`
```js
Expand Down Expand Up @@ -375,8 +375,8 @@ exports.isDate = function (date) {

### @mixin

功能: 引入mixin文件
使用范围: 入口文件,用例(组)头部
- 功能: 引入mixin文件
- 使用范围: 入口文件,用例(组)头部

首先创建一个文件存储Mixin定义的文件

Expand Down Expand Up @@ -425,8 +425,8 @@ exports.isDate = function (date) {

### @client

功能: 配置客户端
使用范围: 入口文件,用例(组)头部
- 功能: 配置客户端
- 使用范围: 入口文件,用例(组)头部

[客户端](#client)负责根据`req`构造请求,发给服务端,接收服务端的响应,构造`res`响应数据。

Expand Down Expand Up @@ -463,8 +463,8 @@ exports.isDate = function (date) {

### @describe

功能:用例或组描述
使用范围: 模块文件,用例(组)头部
- 功能:用例或组描述
- 使用范围: 模块文件,用例(组)头部

```
{
Expand Down Expand Up @@ -506,8 +506,8 @@ main

### @group

功能:用例组标记
使用范围: 用例组头部
- 功能:用例组标记
- 使用范围: 用例组头部

组内的测试用例会继承组的 `@client``@mixin`。组还支持[执行控制](#执行控制)

Expand Down Expand Up @@ -536,8 +536,8 @@ main

### @eval

功能: 使用js表达式生成数据(`req`中),校验数据(`res`中)
使用范围: 用例数据块
- 功能: 使用js表达式生成数据(`req`中),校验数据(`res`中)
- 使用范围: 用例数据块

`@eval` 特点

Expand Down Expand Up @@ -601,8 +601,8 @@ main

### @mock

功能: 使用mock函数生成数据
使用范围: 用例`req`数据块
- 功能: 使用mock函数生成数据
- 使用范围: 用例`req`数据块

Apitest 支持近40个mock函数。详细清单见[sigodne/fake.js](https://github.com/sigoden/fake-js#doc)

Expand All @@ -629,8 +629,8 @@ Apitest 支持近40个mock函数。详细清单见[sigodne/fake.js](https://gith

### @trans

功能: 变换数据
使用范围: 用例数据块
- 功能: 变换数据
- 使用范围: 用例数据块

```
{
Expand Down Expand Up @@ -661,8 +661,8 @@ Apitest 支持近40个mock函数。详细清单见[sigodne/fake.js](https://gith

### @every

功能: 一组断言全部通过才测试通过
使用范围: 用例`res`数据块
- 功能: 一组断言全部通过才测试通过
- 使用范围: 用例`res`数据块

```
{
Expand All @@ -684,8 +684,8 @@ Apitest 支持近40个mock函数。详细清单见[sigodne/fake.js](https://gith
### @some


功能: 一组断言有一个通过就测试通过
使用范围: 用例`res`数据块
- 功能: 一组断言有一个通过就测试通过
- 使用范围: 用例`res`数据块

```
{
Expand All @@ -705,8 +705,8 @@ Apitest 支持近40个mock函数。详细清单见[sigodne/fake.js](https://gith

### @partial

功能: 标记仅局部校验而不是全等校验
使用范围: 用例`res`数据块
- 功能: 标记仅局部校验而不是全等校验
- 使用范围: 用例`res`数据块

```
{
Expand Down Expand Up @@ -737,8 +737,8 @@ Apitest 支持近40个mock函数。详细清单见[sigodne/fake.js](https://gith

### @type

功能: 标记仅校验数据的类型
使用范围: 用例`res`数据块
- 功能: 标记仅校验数据的类型
- 使用范围: 用例`res`数据块

```
{
Expand Down

0 comments on commit d52248d

Please sign in to comment.