mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-10 16:08:40 +01:00
753a576c3c
Safe Mode Sandbox using QuickJS Co-authored-by: Anoop M D <anoop.md1421@gmail.com> Co-authored-by: lohit <lohit.jiddimani@gmail.com>
24 lines
368 B
Plaintext
24 lines
368 B
Plaintext
meta {
|
|
name: getEnvName
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
get {
|
|
url: {{host}}/ping
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
script:pre-request {
|
|
const envName = bru.getEnvName();
|
|
bru.setVar("testEnvName", envName);
|
|
}
|
|
|
|
tests {
|
|
test("should get env name in scripts", function() {
|
|
const testEnvName = bru.getVar("testEnvName");
|
|
expect(testEnvName).to.equal("Prod");
|
|
});
|
|
}
|