You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a good use-case for await!, but there's the risk that no :hello event is ever sent and that the smoke test will block indefinitely. I suggest extending await! to take an optional timeout.
Issue #35
This commit adds a new category of tests: smoke tests. What's a smoke
test? When you plug your new fancy electronics device into the socket,
does sinister black smoke erupt from the circuits? Colloquially: does it
work at all in a real-life scenario?
The specific smoke test added attempts to connect to Slack using a Slack
bot token that is expected to be available as an environment variable
called SLACK_BOT_TOKEN. It will then await the :hello event from the
server and fail unless this is received within 5 seconds.
Awaiting an event in a test necessitated a slight modification to the
await! function: it will work as before, but now you can optionally
supply a second argument, which will be used as a timeout. If nothing
has happened within the timeout, nil is returned.
It would be a nice smoke test to connect to a network and ensure the the hello event is actually received.
The text was updated successfully, but these errors were encountered: