Files
bruno/packages/bruno-tests/collection/scripting/api/req/getPathParams.bru

24 lines
357 B
Plaintext

meta {
name: getPathParam
type: http
seq: 1
}
get {
url: {{host}}/:pathParam
body: none
auth: none
}
params:path {
pathParam: ping
}
tests {
test("req.getPathParams()", function() {
const pathParams = req.getPathParams();
expect(pathParams[0].name).to.equal('pathParam');
expect(pathParams[0].value).to.equal('ping');
});
}