bruno/packages/bruno-tests/collection/scripting/api/bru/getRequestVar.bru

23 lines
343 B
Plaintext
Raw Normal View History

2024-12-05 11:15:36 +01:00
meta {
name: getRequestVar
type: http
seq: 7
}
get {
url: {{host}}/ping
body: none
auth: none
}
vars:pre-request {
request-var: request-var-value
}
tests {
test("should get request var in scripts", function() {
const testVar = bru.getRequestVar("request-var");
expect(testVar).to.equal("request-var-value");
});
}