From e4525d8900ff5126e519c5c8c80c9fa382f45f99 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 6 Jul 2022 11:26:38 +0800 Subject: [PATCH] chore(release): version v0.13.0 --- README.md | 2 +- README.zh-CN.md | 20 ++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fd7cb92..775998c 100644 --- a/README.md +++ b/README.md @@ -811,7 +811,7 @@ Apitest supports nearly 40 mock functions. For a detailed list, see [fake-js](ht ### @nullable -**Field maybe null** +**Marker field can be null** > scope: unit res block ``` diff --git a/README.zh-CN.md b/README.zh-CN.md index 269b209..6938a6b 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -38,6 +38,7 @@ Apitest 是一款使用类JSON的DSL编写测试用例的自动化测试工具 - [@partial](#partial) - [@type](#type) - [@optional](#optional) + - [@nullable](#nullable) - [执行控制](#执行控制) - [跳过](#跳过) - [延时](#延时) @@ -802,6 +803,25 @@ Apitest 支持近40个mock函数。详细清单见[fake-js](https://github.com/s } ``` +### @nullable + +- 功能: 标记字段可为`null`值 +- 使用范围: 用例`res`数据块 + +``` +{ + test1: { @client("echo") + req: { + v1: null, + // v1: 3, + }, + res: { + v1: 3, @nullable + } + } +} +``` + ## 执行控制 Apitest 允许测试用例或组通过 `run` 属性自定义执行逻辑。 diff --git a/package-lock.json b/package-lock.json index 5bc2ee4..77c8401 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sigodenjs/apitest", - "version": "0.12.0", + "version": "0.13.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sigodenjs/apitest", - "version": "0.12.0", + "version": "0.13.0", "license": "MIT", "dependencies": { "@sigodenjs/fake": "^0.2.0", diff --git a/package.json b/package.json index 75d9c35..3ac76bf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@sigodenjs/apitest", "description": "Apitest is declarative api testing tool with JSON-like DSL.", - "version": "0.12.0", + "version": "0.13.0", "bin": { "apitest": "dist/bin.js" },