Files
bruno/packages/bruno-tests/collection/scripting/api/bru/setVar.bru
Anoop M D a18e5e5b94 Feat/safe mode quickjs (#2825)
* feat: testing quickjs sanbox

* feat: testing quickjs sanbox

* feat: testing quickjs sanbox
2024-08-13 19:06:17 +05:30

23 lines
343 B
Plaintext

meta {
name: setVar
type: http
seq: 4
}
get {
url: {{host}}/ping
body: none
auth: none
}
script:post-response {
bru.setVar("testSetVar", "bruno-test-87267")
}
tests {
test("should get var in scripts", function() {
const testSetVar = bru.getVar("testSetVar");
expect(testSetVar).to.equal("bruno-test-87267");
});
}