Log out as a person does: the user menu of the page, then its "Log out" item. The session ends on the server, so no later scenario takes it over.
Examples
When I log out
When we log out
And I log out
Then I log out
Given I log out
Pattern
When(/^(I |we )*log out$/, …)
Part of @webship-js/moodle-steps (github.com/webship/moodle-steps), a step pack for Webship-js 2.0.x.