bruno/packages/bruno-tests/collection/scripting/js/folder-collection script-tests.bru

29 lines
659 B
Plaintext

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");
});
}