fix: return empty ticket list when no tickets found
This commit is contained in:
@@ -327,11 +327,11 @@
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test(\"Ticket list is array or null\", function () {",
|
||||
"pm.test(\"Ticket list is an array\", function () {",
|
||||
" const text = pm.response.text();",
|
||||
" if (!text) return;",
|
||||
" pm.expect(text).to.not.equal(\"\");",
|
||||
" const json = pm.response.json();",
|
||||
" pm.expect(json === null || Array.isArray(json)).to.equal(true);",
|
||||
" pm.expect(Array.isArray(json)).to.equal(true);",
|
||||
"});",
|
||||
"",
|
||||
"const tickets = pm.response.text() ? pm.response.json() : null;",
|
||||
|
||||
Reference in New Issue
Block a user