fix: cli - collection level script, added tests

This commit is contained in:
lohxt1
2024-12-06 22:58:02 +05:30
parent 67ead9739e
commit 3fe0d43bdc
5 changed files with 104 additions and 16 deletions

View File

@@ -0,0 +1,28 @@
meta {
name: folder-collection script-tests
type: http
seq: 5
}
post {
url: {{echo-host}}
body: none
auth: none
}
script:pre-request {
// do not delete - the collection/folder scripts/tests run during this request execution
}
tests {
const collectionHeader = req.getHeader("collection-header");
const folderHeader = req.getHeader("folder-header");
test("should get the header value set at collection level", function() {
expect(collectionHeader).to.equal("collection-header-value");
});
test("should get the header value set at folder level", function() {
expect(folderHeader).to.equal("folder-header-value");
});
}