What is the execution model for nightwatch custom commands, and how do I wait for them?

It appears that my custom commands implemented for Nightwatch.js are getting executed asynchronously. A

console.log

message inside the custom command is showing up after a

console.log

message issued from after the command is invoked. I can't find any reference in the nightwatch documentation about how these commands are executed, but since they appear to be asynchronous, I'm not sure how I can wait to make sure one command has completed before the next one is executed (because this doesn't not appear to be the case).