levz0r / gmail-tester

A simple Node.js Gmail client which checks the inbox for message existence
MIT License
256 stars 68 forks source link

Add `quiet` option #108

Closed danlynkew closed 1 year ago

danlynkew commented 2 years ago

Package currently pollutes Cypress test logs with output such as below. @levz0r, please add a quiet option for us! 😄 And thank you for this wonderful package!


[gmail] Found!
[gmail] Checking for message from 'test@gmail.com', to: undefined, contains 'Verify your current email' in subject...
[gmail] Found!
[gmail] Checking for message from 'test@gmail.com', to: undefined, contains 'Change your email' in subject...
[gmail] Message not found. Waiting 1 seconds...
[gmail] Message not found. Waiting 1 seconds...
[gmail] Message not found. Waiting 1 seconds...
[gmail] Message not found. Waiting 1 seconds...
[gmail] Found!
[gmail] Checking for message from 'test@gmail.com', to: undefined, contains 'Change your email' in subject...
[gmail] Found!```
tracy-ash commented 2 years ago

Yes, please! Quiet option!

levz0r commented 1 year ago

Hi guys, Please use get_messages() function.

danlynkew commented 1 year ago

Thanks for the response, @levz0r. I tried calling get_messages() instead of check_inbox(). But get_messages() seems to instantly return me an empty array. I've confirmed that the messages are in the inbox, and they're always detected properly by check_inbox().

I tried to follow your get_messages() example in the docs. Am I using get_messages() incorrectly?

Screen Shot 2022-12-21 at 5 00 28 PM Screen Shot 2022-12-21 at 5 00 15 PM