fix(接口测试): 修复响应体包含时间格式,推荐断言替换数字为字符串失败的缺陷

--bug=1025544 --user=王孝刚 【接口测试】github#23697,jsonpath提取的值缺失精度
https://www.tapd.cn/55049933/s/1363739
This commit is contained in:
wxg0103 2023-04-18 14:02:18 +08:00 committed by 刘瑞斌
parent e6a12a2014
commit e571533c67
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ export default {
open(objStr) {
this.data = {};
try {
let stringedJSON = objStr.replace(/:\s*([-+Ee0-9.]+)/g, ': "$1"');
let stringedJSON = objStr.replace(/:\s*(?!.*\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2})\s([-+Ee0-9.]+)/g, ': "$1"');
let param;
let JSONBig = require('json-bigint')({"storeAsString": true});
//