How do I use per test file hooks? #3009
-
I have a test file with the following:
I want to run a node create before hook but only for this test so that it can function independently and not need to run creating.js test before this one just to test it. I'm reading https://nightwatchjs.org/guide/using-nightwatch/using-test-hooks.html#before-beforeeach-after-aftereach but it, like most of the docs (please improve it for newbies like me), seems to presume I know where the example code goes... I don't want to use the global hooks, and instead want the hooks to be only in I guess I could create a global function that I then call from browser.globals and which does the create, but I'd like to start with something inside of the How do I achieve this? Update: I tried:
But it's throwing
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Simple, I was overthinking it:
|
Beta Was this translation helpful? Give feedback.
Simple, I was overthinking it: