At the moment, I am using a var
that is assigned an object from another hook
. I am wanting to change this to a let
, but I keep stumbling across errors.
Current setup:
var tc;
module.exports = {
before(browser) {
tc = new func()(x, y); // needs to be assigned here.
},
'Test': function (browser) {
tc // needs to be referenced here too.
},
};
How can I change it to let
yet assign/reference it within other hooks and test cases (I'm using Mocha).