Submission for postman badge failed on Day 6 but no error

Hi, my submission for postman badge failed on Day 6 (as per email) but no apparent error is visible for me. I run collections one by one again to double check if every test is passing and seems like it is. Could anyone review my code and point me in the right direction?


https://www.postman.com/restless-resonance-426735/workspace/kjrostkowski/overview

Hey there,

Looks like you’ve edited the tests in the submit collection request, therefore it works when you test it directly but the ones we run on our end do not pass.

Line 55-56, you have:

    let idVar = collection.variable.find(variable => { return variable.key === 'userId'})
    pm.expect(idVar.key, 'check id variable set').to.equal('userId')

when it should be:

    let idVar = collection.variable.find(variable => { return variable.key === 'user_id'})
    pm.expect(idVar.key, 'check id variable set').to.equal('user_id')
1 Like

Thank you very much, my bad totally forgot about it :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.