fix bru safe mode and add test (#6667)

* fix bru safe mode and add tests

* rm: settimeout

fix: isSafe mode test (#6844)
This commit is contained in:
Pooja
2026-01-19 14:52:42 +05:30
committed by Siddharth Gelera
parent f9423d1238
commit a724f010ff
8 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
{
"version": "1",
"name": "is-safe-mode-test",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}

View File

@@ -0,0 +1,17 @@
meta {
name: test-safe-mode-false
type: http
seq: 2
}
get {
url: https://echo.usebruno.com
body: none
auth: none
}
tests {
test("bru.isSafeMode() returns false in developer mode", function() {
expect(bru.isSafeMode()).to.be.false;
});
}

View File

@@ -0,0 +1,17 @@
meta {
name: test-safe-mode-true
type: http
seq: 1
}
get {
url: https://echo.usebruno.com
body: none
auth: none
}
tests {
test("bru.isSafeMode() returns true in safe mode", function() {
expect(bru.isSafeMode()).to.be.true;
});
}