added res url api hint words, updated test (#5234)

This commit is contained in:
lohit
2025-07-31 22:31:30 +05:30
committed by GitHub
parent 81b5e3c539
commit 8938b04faf
2 changed files with 6 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ const STATIC_API_HINTS = {
'res.headers',
'res.body',
'res.responseTime',
'res.url',
'res.getStatus()',
'res.getStatusText()',
'res.getHeader(name)',
@@ -48,6 +49,7 @@ const STATIC_API_HINTS = {
'res.getSize().header',
'res.getSize().body',
'res.getSize().total',
'res.getUrl()'
],
bru: [
'bru',

View File

@@ -16,6 +16,10 @@ assert {
}
tests {
test("res.url", function() {
expect(res.url).to.equal("https://testbench-sanity.usebruno.com/ping");
});
test("res.getUrl()", function() {
const url = res.getUrl();
expect(url).to.equal("https://testbench-sanity.usebruno.com/ping");