Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5ba01b
commit 9f4da05
Showing
5 changed files
with
62 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 0 additions & 84 deletions
84
packages/hoppscotch-cli/src/__tests__/functions/checks/isRESTCollection.spec.ts
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
packages/hoppscotch-cli/src/__tests__/samples/collections/coll-v2-req-v3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"v": 2, | ||
"name": "coll-v2", | ||
"folders": [], | ||
"requests": [ | ||
{ | ||
"v": "3", | ||
"endpoint": "https://httpbin.org/get", | ||
"headers": [ | ||
{ | ||
"key": "Inactive-Header", | ||
"value": "Inactive Header", | ||
"active": false | ||
}, | ||
{ | ||
"key": "Authorization", | ||
"value": "Bearer token123", | ||
"active": true | ||
} | ||
], | ||
"params": [ | ||
{ | ||
"key": "key", | ||
"value": "value", | ||
"active": true | ||
}, | ||
{ | ||
"key": "inactive-key", | ||
"value": "inactive-param", | ||
"active": false | ||
} | ||
], | ||
"name": "req-v3", | ||
"method": "GET", | ||
"preRequestScript": "", | ||
"testScript": "pw.test(\"Asserts request params\", () => {\n pw.expect(pw.response.body.args.key).toBe(\"value\")\n pw.expect(pw.response.body.args[\"inactive-key\"]).toBe(undefined)\n})\n\npw.test(\"Asserts request headers\", () => {\n pw.expect(pw.response.body.headers[\"Authorization\"]).toBe(\"Bearer token123\")\n pw.expect(pw.response.body.headers[\"Inactive-Header\"]).toBe(undefined)\n})", | ||
"body": { | ||
"contentType": null, | ||
"body": null | ||
}, | ||
"auth": { | ||
"authType": "bearer", | ||
"authActive": true, | ||
"token": "token123" | ||
}, | ||
"requestVariables": [] | ||
} | ||
], | ||
"auth": { | ||
"authType": "inherit", | ||
"authActive": true | ||
}, | ||
"headers": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters