fix(接口测试): 修复响应体包含时间格式,推荐断言替换数字为字符串失败的缺陷
--bug=1025544 --user=王孝刚 【接口测试】github#23697,jsonpath提取的值缺失精度 https://www.tapd.cn/55049933/s/1363739
This commit is contained in:
parent
6f31c0964f
commit
4bfb7574a6
|
@ -73,7 +73,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 });
|
||||
// 解决精度丢失问题
|
||||
|
|
|
@ -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});
|
||||
// 解决精度丢失问题
|
||||
|
|
Loading…
Reference in New Issue