Assert that the account creation form refused the account with an error message (or a part of it), and that the account does not exist unless its name was already in use.
Examples
Then the account creation should be refused with "The passwords you entered do not match."
Then the account creation should be refused with "Username entered already in use. Please choose a different name."
Then the account creation should be refused with "Passwords must be at least 8 characters."
And the account creation should be refused with "There are problems with some of your input."
Then the account creation should be refused with "The password entered is in a list of very commonly used passwords."
Pattern
Then(/^the account creation should be refused with "([^"]*)"$/, …)
Part of @webship-js/mediawiki-steps (github.com/webship/mediawiki-steps), a step pack for Webship-js 2.0.x.