Compare 2 strings

It should be the following.

pm.test("Name", function(){
    pm.expect(inputName.toUpperCase()).to.eql(resName.toUpperCase());
})`

image

Because you aren’t calling the toUpperCase() function properly, the way you had it is basically comparing the text [Function: toUpperCase] for both variables. (Therefore passing each time).

1 Like