I've been playing a little bit with Selenium for testing purposes. Here's a tiny example.
Create a package.json file manually or via. npm init. You could run the npm commands separately but why not just run them one time and let npm do the rest.
Write your first script
Example below hasn't been tested. But I've used it on live tests with small adjustments. Try it out! 😊
Run and execute tests
# Test a whole file
$ npm run file --file=Features
# Test and run a single function
$ npm run function --filename=Features --func="I am feature 1"