When I use jest
with common functions, I have access to test object in this
.
afterEach(function() {
return this.hello; // 'Hello world!'
})
it(function() {
this.hello = 'Hello world!';
})
When I use arrow functuions this
means global context.
How I can access to test object, when I use arrow functions?