before(() => path = ‘./message.txt’); // Would not pass the check
afterEach(() => {
fs.unlinkSync(path);
});
I was stuck doing the Mocha hook’s lesson because I had written a before
hook with a concise body arrow function as shown above. I had to rewrite it using brackets before the lesson check passed my work.
Are they not allowed in Mocha?