2024-01-29 09:04:55 +01:00
|
|
|
headers {
|
|
|
|
check: again
|
2024-09-03 17:48:38 +02:00
|
|
|
token: {{collection_pre_var_token}}
|
2024-12-06 18:28:02 +01:00
|
|
|
collection-header: collection-header-value
|
2024-01-29 09:04:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
auth {
|
2024-03-12 19:13:50 +01:00
|
|
|
mode: bearer
|
|
|
|
}
|
|
|
|
|
|
|
|
auth:bearer {
|
|
|
|
token: {{bearer_auth_token}}
|
2024-01-29 09:04:55 +01:00
|
|
|
}
|
|
|
|
|
2024-09-03 17:48:38 +02:00
|
|
|
vars:pre-request {
|
|
|
|
collection_pre_var: collection_pre_var_value
|
|
|
|
collection_pre_var_token: {{request_pre_var_token}}
|
2024-12-05 11:15:36 +01:00
|
|
|
collection-var: collection-var-value
|
2024-09-03 17:48:38 +02:00
|
|
|
}
|
|
|
|
|
2024-12-06 18:28:02 +01:00
|
|
|
script:pre-request {
|
|
|
|
// used by `scripting/js/folder-collection script-tests`
|
|
|
|
const shouldTestCollectionScripts = bru.getVar('should-test-collection-scripts');
|
|
|
|
if(shouldTestCollectionScripts) {
|
|
|
|
bru.setVar('collection-var-set-by-collection-script', 'collection-var-value-set-by-collection-script');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tests {
|
|
|
|
// used by `scripting/js/folder-collection script-tests`
|
|
|
|
const shouldTestCollectionScripts = bru.getVar('should-test-collection-scripts');
|
|
|
|
const collectionVar = bru.getVar("collection-var-set-by-collection-script");
|
|
|
|
if (shouldTestCollectionScripts && collectionVar) {
|
|
|
|
test("collection level test - should get the var that was set by the collection script", function() {
|
|
|
|
expect(collectionVar).to.equal("collection-var-value-set-by-collection-script");
|
|
|
|
});
|
|
|
|
bru.setVar('collection-var-set-by-collection-script', null);
|
|
|
|
bru.setVar('should-test-collection-scripts', null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-29 09:04:55 +01:00
|
|
|
docs {
|
|
|
|
# bruno-testbench 🐶
|
|
|
|
|
|
|
|
This is a test collection that I am using to test various functionalities around bruno
|
|
|
|
}
|