mailosaur / mailosaur-node

Mailosaur email and SMS testing library for Node.js
https://mailosaur.com/docs/languages/nodejs/
MIT License
20 stars 13 forks source link

Some URLs have "null" appended when no query string is provided #64

Closed nibblesnbits closed 1 year ago

nibblesnbits commented 1 year ago

I've discovered that in some contexts (in my case, running in Cypress), that requests such as ones called by getById have the string "null" appended to the path because the search property of the URL is null. This line is the culprit. I'm submitting a pull request shortly with the fix, which is simply a fallback to an empty string.

jm-mailosaur commented 1 year ago

Thanks @nibblesnbits, this is now incorporated into version 8.6.1. Just incase you didn't realise, we also have a dedicated Cypress plugin that may be of use if you're working with Cypress.

nibblesnbits commented 1 year ago

I didn't know about that. Thanks!