Use JSON.stringify instead of toString

This commit is contained in:
dongfang
2025-02-06 06:39:32 +00:00
parent 05e448c4c5
commit 9fe2de8969

View File

@@ -187,7 +187,7 @@ class NetworkService {
}
let match;
result = result.toString();
result = typeof result === "object" ? JSON.stringify(result) : result.toString();
if (matchMethod === "include") match = result.includes(expectedValue);
else if (matchMethod === "regex") match = new RegExp(expectedValue).test(result);
else match = result === expectedValue;