I'm working with a team that has a project in Nightwatch.js. They are defining commands for almost everything:
- Datetime functions as commands (return current day, array of days in a period, etc.)
- SQL queries to get data as commands
To me, some of these fit better to utility classes, but they prefer to have them as commands, so they can access them via browser.Command
.
What's the correct approach or recommendation? All in commands looks odd to me, but also the codes look more clean, as you don't need to do imports.
Thanks,