mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-25 13:45:52 +00:00
* fix: resolve global env variable becoming undefined on script execution Fixes an issue where global disabled environment variables were becoming undefined during request execution when the pre request script is non-empty. The update ensures that global variables persist as expected and are correctly referenced throughout the request lifecycle. Closes #5772. * feat: added test for checking proper global env update through scripts * refactor: updated comments for more readability and added a new data-testid in modal.
25 lines
436 B
Plaintext
25 lines
436 B
Plaintext
meta {
|
|
name: Test Request
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
get {
|
|
url: {{baseUrl}}/users
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
script:pre-request {
|
|
//update already existing enabled env variable
|
|
bru.setGlobalEnvVar("existingEnvEnabled", "newExistingEnvEnabledValue");
|
|
|
|
//update already existing disabled env variable
|
|
bru.setGlobalEnvVar("existingEnvDisabled", "newExistingEnvDisabledValue");
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|